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

Element schématu XML anyAttribute


❮ Vyplňte odkaz na schéma XML

Definice a použití

Element anyAttribute umožňuje autorovi rozšířit dokument XML o atributy, které nejsou specifikovány schématem.

Informace o prvku

  • Nadřazené prvky: complexType, omezení (jak simpleContent, tak complexContent), rozšíření (jak simpleContent, tak complexContent), atributGroup

Syntax

<anyAttribute
id=ID
namespace=namespace
processContents=lax|skip|strict
any attributes
>

(annotation?)

</anyAttribute>

(Znak ? deklaruje, že prvek se může vyskytovat nula nebo jednou v prvku anyAttribute)

Attribute Description
id Optional. Specifies a unique ID for the element
namespace Optional. Specifies the namespaces containing the attributes that can be used. Can be set to one of the following:
  • ##any - attributes from any namespace is allowed (this is default)
  • ##other - attributes from any namespace that is not the namespace of the parent element can be present
  • ##local - attributes must come from no namespace
  • ##targetNamespace - attributes from the namespace of the parent element can be present
  • List of {URI references of namespaces, ##targetNamespace, ##local} - attributes 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 <anyAttribute> může autor přidat libovolný počet atributů do prvku „person“:

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

❮ Vyplňte odkaz na schéma XML