xs:schema

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
attributeFormDefault xs:formChoice unqualified optional
blockDefault xs:blockSet optional
elementFormDefault xs:formChoice unqualified optional
finalDefault xs:fullDerivationSet optional
id xs:ID optional
targetNamespace xs:anyURI optional
version xs:token optional
xml:lang union of(xs:language, restriction of xs:string) optional
Attempting to install the relevant ISO 2- and 3-letter
         codes as the enumerated possible values is probably never
         going to be a realistic possibility.  See
         RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
         at http://www.iana.org/assignments/lang-tag-apps.htm for
         further information.

         The union allows for the 'un-declaration' of xml:lang with
         the empty string.
Wildcard: ANY attribute from ANY namespace OTHER than 'http://www.w3.org/2001/XMLSchema'

Used By

Source

<xs:element name="schema" id="schema">
  <xs:annotation>
    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>
  </xs:annotation>
  <xs:complexType>
    <xs:complexContent>
      <xs:extension base="xs:openAttrs">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="xs:include"/>
            <xs:element ref="xs:import"/>
            <xs:element ref="xs:redefine"/>
            <xs:element ref="xs:annotation"/>
          </xs:choice>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:group ref="xs:schemaTop"/>
            <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:sequence>
        <xs:attribute name="targetNamespace" type="xs:anyURI"/>
        <xs:attribute name="version" type="xs:token"/>
        <xs:attribute name="finalDefault" type="xs:fullDerivationSet" use="optional" default=""/>
        <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/>
        <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
        <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
        <xs:attribute name="id" type="xs:ID"/>
        <xs:attribute ref="xml:lang"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:key name="element">
    <xs:selector xpath="xs:element"/>
    <xs:field xpath="@name"/>
  </xs:key>
  <xs:key name="attribute">
    <xs:selector xpath="xs:attribute"/>
    <xs:field xpath="@name"/>
  </xs:key>
  <xs:key name="type">
    <xs:selector xpath="xs:complexType|xs:simpleType"/>
    <xs:field xpath="@name"/>
  </xs:key>
  <xs:key name="group">
    <xs:selector xpath="xs:group"/>
    <xs:field xpath="@name"/>
  </xs:key>
  <xs:key name="attributeGroup">
    <xs:selector xpath="xs:attributeGroup"/>
    <xs:field xpath="@name"/>
  </xs:key>
  <xs:key name="notation">
    <xs:selector xpath="xs:notation"/>
    <xs:field xpath="@name"/>
  </xs:key>
  <xs:key name="identityConstraint">
    <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
    <xs:field xpath="@name"/>
  </xs:key>
</xs:element>

Sample