XML- tutoriaal

XML TUIS XML Inleiding XML Hoe om te gebruik XML-boom XML-sintaksis XML elemente XML-kenmerke XML Naamruimtes XML vertoon XML HttpRequest XML-ontleder XML DOM XML XPath XML XSLT XML XQuery XML XLink XML valideerder XML DTD XML-skema XML-bediener XML voorbeelde XML Vasvra XML-sertifikaat

XML AJAX

AJAX Inleiding AJAX XMLHttp AJAX-versoek AJAX-reaksie AJAX XML-lêer AJAX PHP AJAX ASP AJAX-databasis AJAX toepassings AJAX voorbeelde

XML DOM

DOM Inleiding DOM nodusse Toegang tot DOM DOM Node Info DOM Node Lys DOM deurkruis DOM Navigeer DOM Kry waardes DOM Verander nodusse DOM Verwyder nodes DOM vervang nodusse DOM Skep nodusse DOM Voeg nodes by DOM Kloon nodusse DOM Voorbeelde

XPath handleiding

XPath Inleiding XPath nodes XPath-sintaksis XPath-asse XPath-operateurs XPath voorbeelde

XSLT- tutoriaal

XSLT Inleiding XSL-tale XSLT-transformasie XSLT <sjabloon> XSLT <waarde-van> XSLT <vir-elk> XSLT <sorteer> XSLT <if> XSLT <kies> XSLT Pas toe XSLT op die kliënt XSLT op die bediener XSLT Wysig XML XSLT voorbeelde

XQuery- tutoriaal

XQuery Inleiding XQuery voorbeeld XQuery FLWOR XQuery HTML XQuery-bepalings XQuery-sintaksis XQuery Voeg by XQuery Kies XQuery-funksies

XML DTD

DTD Inleiding DTD Boublokke DTD Elemente DTD-kenmerke DTD Elements vs Attr DTD Entiteite DTD voorbeelde

XSD- skema

XSD Inleiding XSD Hoe om XSD <skema> XSD-elemente XSD-kenmerke XSD-beperkings

XSD -kompleks

XSD-elemente XSD leeg Slegs XSD-elemente Slegs XSD-teks XSD gemeng XSD-aanwysers XSD <enige> XSD <anyAttribute> XSD-vervanging XSD voorbeeld

XSD data

XSD-string XSD datum XSD Numeries XSD Diverse XSD-verwysing

Webdienste _

XML Dienste XML WSDL XML SEEP XML RDF XML RSS

Verwysings

DOM Node Tipes DOM Node DOM NodeLys DOM NamedNodeMap DOM-dokument DOM Element DOM-kenmerk DOM teks DOM CDATA DOM Kommentaar DOM XMLHttpRequest DOM-ontleder XSLT-elemente XSLT/XPath-funksies

XML-skema anyAttribute Element


❮ Voltooi XML-skemaverwysing

Definisie en gebruik

Die anyAttribute-element stel die skrywer in staat om die XML-dokument uit te brei met eienskappe wat nie deur die skema gespesifiseer is nie.

Elementinligting

  • Ouerelemente : kompleksTipe, beperking (beide eenvoudigInhoud en kompleksInhoud), uitbreiding (beide eenvoudigInhoud en kompleksInhoud), kenmerkGroep

Sintaksis

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

(annotation?)

</anyAttribute>

(Die ? teken verklaar dat die element nul of een keer binne die anyAttribute element kan voorkom)

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

Voorbeeld 1

Die volgende voorbeeld toon 'n verklaring vir 'n element genaamd "persoon". Deur die <anyAttribute>-element te gebruik, kan die skrywer enige aantal eienskappe by die "persoon"-element voeg:

<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>

❮ Voltooi XML-skemaverwysing