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

Schéma XML libovolný prvek


❮ Vyplňte odkaz na schéma XML

Definice a použití

Element any umožňuje autorovi rozšířit dokument XML o prvky, které nejsou specifikovány ve schématu.

Informace o prvku

  • Nadřazené prvky: výběr, posloupnost

Syntax

<any
id=ID
maxOccurs=nonNegativeInteger|unbounded
minOccurs=nonNegativeInteger
namespace=namespace
processContents=lax|skip|strict
any attributes
>

(annotation?)

</any>

(Znak ? deklaruje, že prvek se může vyskytovat nula nebo jednou uvnitř libovolného prvku)

Attribute Description
id Optional. Specifies a unique ID for the element
maxOccurs Optional. Specifies the maximum number of times the any element can occur in the parent element. The value can be any number >= 0, or if you want to set no limit on the maximum number, use the value "unbounded". Default value is 1
minOccurs Optional. Specifies the minimum number of times the any element can occur in the parent element. The value can be any number >= 0. Default value is 1
namespace Optional. Specifies the namespaces containing the elements that can be used. Can be set to one of the following:
  • ##any - elements from any namespace is allowed (this is default)
  • ##other - elements from any namespace that is not the namespace of the parent element can be present
  • ##local - elements must come from no namespace
  • ##targetNamespace - elements from the namespace of the parent element can be present
  • List of {URI references of namespaces, ##targetNamespace, ##local} - elements from a space-delimited list of the namespaces can be present
processContents Optional. Specifies how the XML processor should handle validation against the elements specified by this any element. Can be set to one of the following:
  • strict - the XML processor must obtain the schema for the required namespaces and validate the elements (this is default)
  • lax - same as strict but; if the schema cannot be obtained, no errors will occur
  • skip - The XML processor does not attempt to validate any elements from the specified namespaces
any attributes Optional. Specifies any other attributes with non-schema namespace

Příklad 1

Následující příklad ukazuje deklaraci pro prvek nazvaný "osoba". Pomocí prvku <any> může autor rozšířit (za <příjmení>) obsah "osoby" o jakýkoli prvek:

<xs:element name="person">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="firstname" type="xs:string"/>
      <xs:element name="lastname" type="xs:string"/>
      <xs:any minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

❮ Vyplňte odkaz na schéma XML