Výukový program XML

XML HOME Úvod do XML XML Jak používat XML strom Syntaxe XML Prvky XML Atributy XML Jmenné prostory XML Zobrazení XML XML HttpRequest XML Parser XML DOM XML XPath XML XSLT XML XQuery XML XLlink XML Validator XML DTD Schéma XML XML server Příklady XML XML kvíz XML certifikát

XML AJAX

Úvod do AJAX AJAX XMLHttp Požadavek AJAX Odpověď AJAX Soubor XML AJAX AJAX PHP AJAX ASP Databáze AJAX Aplikace AJAX Příklady AJAX

XML DOM

Úvod do DOM DOM uzly Přístup k DOM Informace o uzlu DOM Seznam uzlů DOM DOM Traversing Navigace DOM DOM získat hodnoty DOM změnit uzly DOM Remove Nodes DOM nahradit uzly DOM Vytvořte uzly DOM Přidat uzly Klonovací uzly DOM Příklady DOM

Výukový program XPath

Úvod do XPath Uzly XPath Syntaxe XPath osy XPath Operátoři XPath Příklady XPath

Kurz XSLT

Úvod do XSLT Jazyky XSL Transformace XSLT XSLT <šablona> XSLT <hodnota-of> XSLT <pro každého> XSLT <sort> XSLT <if> XSLT <vyberte> Použít XSLT XSLT u klienta XSLT na serveru XSLT Úprava XML Příklady XSLT

Výukový program XQuery

Úvod do XQuery Příklad XQuery XQuery FLWOR HTML XQuery Podmínky XQuery Syntaxe XQuery Přidat XQuery XQuery Select Funkce XQuery

XML DTD

Úvod do DTD Stavební bloky DTD DTD prvky Atributy DTD DTD Elements vs Attr DTD entity Příklady DTD

XSD schéma

Úvod do XSD XSD Jak na to XSD <schéma> XSD prvky XSD atributy Omezení XSD

XSD komplex

XSD prvky XSD Prázdné Pouze prvky XSD Pouze text XSD XSD smíšené XSD indikátory XSD <libovolné> XSD <jakýkoliAtribut> Náhrada XSD Příklad XSD

XSD data

XSD řetězec Datum XSD Číselné XSD XSD Různé XSD reference

Webové služby

Služby XML XML WSDL XML SOAP XML RDF XML RSS

Reference

Typy uzlů DOM Uzel DOM DOM NodeList DOM NamedNodeMap Dokument DOM Prvek DOM Atribut DOM Text DOM DOM CDATA Komentář DOM DOM XMLHttpRequest DOM Parser Prvky XSLT Funkce XSLT/XPath

Položka schématu XML


❮ Vyplňte odkaz na schéma XML

Definice a použití

Prvek schématu definuje kořenový prvek schématu.

Informace o prvku

  • Nadřazené prvky: ŽÁDNÉ

Syntax

<schema
id=ID
attributeFormDefault=qualified|unqualified
elementFormDefault=qualified|unqualified
blockDefault=(#all|list of (extension|restriction|substitution))
finalDefault=(#all|list of (extension|restriction|list|union))
targetNamespace=anyURI
version=token
xmlns=anyURI
any attributes
>

((include|import|redefine|annotation)*,(((simpleType|complexType|
group|attributeGroup)|element|attribute|notation),annotation*)*)

</schema>

Attribute Description
id Optional. Specifies a unique ID for the element
attributeFormDefault Optional. The form for attributes declared in the target namespace of this schema. The value must be "qualified" or "unqualified". Default is "unqualified". "unqualified" indicates that attributes from the target namespace are not required to be qualified with the namespace prefix. "qualified" indicates that attributes from the target namespace must be qualified with the namespace prefix
elementFormDefault Optional. The form for elements declared in the target namespace of this schema. The value must be "qualified" or "unqualified". Default is "unqualified". "unqualified" indicates that elements from the target namespace are not required to be qualified with the namespace prefix. "qualified" indicates that elements from the target namespace must be qualified with the namespace prefix
blockDefault Optional. Specifies the default value of the block attribute on element and complexType elements in the target namespace. The block attribute prevents a complex type (or element) that has a specified type of derivation from being used in place of this complex type. This value can contain #all or a list that is a subset of extension, restriction, or substitution:
  • extension - prevents complex types derived by extension
  • restriction - prevents complex types derived by restriction
  • substitution - prevents substitution of elements
  • #all - prevents all derived complex types
finalDefault Optional. Specifies the default value of the final attribute on element, simpleType, and complexType elements in the target namespace. The final attribute prevents a specified type of derivation of an element, simpleType, or complexType element. For element and complexType elements, this value can contain #all or a list that is a subset of extension or restriction. For simpleType elements, this value can additionally contain list and union:
  • extension - prevents derivation by extension
  • restriction - prevents derivation by restriction
  • list - prevents derivation by list
  • union - prevents derivation by union
  • #all - prevents all derivation
targetNamespace Optional. A URI reference of the namespace of this schema
version Optional. Specifies the version of the schema
xmlns A URI reference that specifies one or more namespaces for use in this schema. If no prefix is assigned, the schema components of the namespace can be used with unqualified references
any attributes Optional. Specifies any other attributes with non-schema namespace

Příklad 1

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="values" type="xs:string" />

</xs:schema>

Příklad 2

V tomto příkladu jsou komponenty schématu (název prvku, typ) v oboru názvů http://www.w3.org/2001/XMLSchema nekvalifikované a komponenty pro https://www.w3schools.com/w3schoolsschema (mystring) jsou kvalifikované. s předponou wsc:

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsc="https://www.w3schools.com/w3shoolsschema">

<element name="fname" type="wsc:mystring"/>

</schema>

❮ Vyplňte odkaz na schéma XML