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


❮ Voltooi XML-skemaverwysing

Definisie en gebruik

Die skema-element definieer die wortelelement van 'n skema.

Elementinligting

  • Ouerelemente: GEEN

Sintaksis

<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

Voorbeeld 1

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

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

</xs:schema>

Voorbeeld 2

In hierdie voorbeeld is die skemakomponente (elementnaam, tipe) in die http://www.w3.org/2001/XMLSchema-naamruimte ongekwalifiseerd en dié vir https://www.w3schools.com/w3schoolsschema (mystring) is gekwalifiseerd met die wsc voorvoegsel:

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

❮ Voltooi XML-skemaverwysing