home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _D03E9F3BDA8F482583AEDB236F9625B2 < prev    next >
Encoding:
Extensible Markup Language  |  2001-11-06  |  82.0 KB  |  2,381 lines

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!-- XML Schema schema for XML Schemas: Part 1: Structures -->
  3. <!-- Note this schema is NOT the normative structures schema. -->
  4. <!-- The prose copy in the structures REC is the normative -->
  5. <!-- version (which shouldn't differ from this one except for -->
  6. <!-- this comment and entity expansions, but just in case -->
  7. <xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
  8.  <xs:annotation>
  9.   <xs:documentation>
  10.     Part 1 version: Id: XMLSchema.xsd,v 1.48 2001/04/24 18:56:39 ht Exp 
  11.     Part 2 version: Id: datatypes.xsd,v 1.52 2001/04/27 11:49:21 ht Exp 
  12.   </xs:documentation>
  13.  </xs:annotation>
  14.  
  15.  
  16.  <xs:annotation>
  17.    <xs:documentation source="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/structures.html">
  18.    The schema corresponding to this document is normative,
  19.    with respect to the syntactic constraints it expresses in the
  20.    XML Schema language.  The documentation (within <documentation> elements)
  21.    below, is not normative, but rather highlights important aspects of
  22.    the W3C Recommendation of which this is a part</xs:documentation>
  23.  </xs:annotation>
  24.  
  25.  <xs:annotation>
  26.    <xs:documentation>
  27.    The simpleType element and all of its members are defined
  28.       towards the end of this schema document</xs:documentation>
  29.  </xs:annotation>
  30.  
  31.  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
  32.    <xs:annotation>
  33.      <xs:documentation>
  34.        Get access to the xml: attribute groups for xml:lang
  35.        as declared on 'schema' and 'documentation' below
  36.      </xs:documentation>
  37.    </xs:annotation>
  38.  </xs:import>
  39.  
  40.  <xs:complexType name="openAttrs">
  41.    <xs:annotation>
  42.      <xs:documentation>
  43.        This type is extended by almost all schema types
  44.        to allow attributes from other namespaces to be
  45.        added to user schemas.
  46.      </xs:documentation>
  47.    </xs:annotation>
  48.    <xs:complexContent>
  49.      <xs:restriction base="xs:anyType">
  50.        <xs:anyAttribute namespace="##other" processContents="lax"/>
  51.      </xs:restriction>
  52.    </xs:complexContent>
  53.  </xs:complexType>
  54.  
  55.  <xs:complexType name="annotated">
  56.    <xs:annotation>
  57.      <xs:documentation>
  58.        This type is extended by all types which allow annotation
  59.        other than <schema> itself
  60.      </xs:documentation>
  61.    </xs:annotation>
  62.    <xs:complexContent>
  63.      <xs:extension base="xs:openAttrs">
  64.        <xs:sequence>
  65.          <xs:element ref="xs:annotation" minOccurs="0"/>
  66.        </xs:sequence>
  67.        <xs:attribute name="id" type="xs:ID"/>
  68.      </xs:extension>
  69.    </xs:complexContent>
  70.  </xs:complexType>
  71.  
  72.  <xs:group name="schemaTop">
  73.   <xs:annotation>
  74.    <xs:documentation>
  75.    This group is for the
  76.    elements which occur freely at the top level of schemas.
  77.    All of their types are based on the "annotated" type by extension.</xs:documentation>
  78.   </xs:annotation>
  79.   <xs:choice>
  80.    <xs:group ref="xs:redefinable"/>
  81.    <xs:element ref="xs:element"/>
  82.    <xs:element ref="xs:attribute"/>
  83.    <xs:element ref="xs:notation"/>
  84.   </xs:choice>
  85.  </xs:group>
  86.  
  87.  <xs:group name="redefinable">
  88.   <xs:annotation>
  89.    <xs:documentation>
  90.    This group is for the
  91.    elements which can self-redefine (see <redefine> below).</xs:documentation>
  92.   </xs:annotation>
  93.   <xs:choice>
  94.    <xs:element ref="xs:simpleType"/>
  95.    <xs:element ref="xs:complexType"/>
  96.    <xs:element ref="xs:group"/>
  97.    <xs:element ref="xs:attributeGroup"/>
  98.   </xs:choice>
  99.  </xs:group>
  100.  
  101.  <xs:simpleType name="formChoice">
  102.   <xs:annotation>
  103.    <xs:documentation>
  104.    A utility type, not for public use</xs:documentation>
  105.   </xs:annotation>
  106.   <xs:restriction base="xs:NMTOKEN">
  107.    <xs:enumeration value="qualified"/>
  108.    <xs:enumeration value="unqualified"/>
  109.   </xs:restriction>
  110.  </xs:simpleType>
  111.  
  112.  <xs:simpleType name="reducedDerivationControl">
  113.   <xs:annotation>
  114.    <xs:documentation>
  115.    A utility type, not for public use</xs:documentation>
  116.   </xs:annotation>
  117.   <xs:restriction base="xs:derivationControl">
  118.    <xs:enumeration value="extension"/>
  119.    <xs:enumeration value="restriction"/>
  120.   </xs:restriction>
  121.  </xs:simpleType>
  122.  
  123.  <xs:simpleType name="derivationSet">
  124.   <xs:annotation>
  125.    <xs:documentation>
  126.    A utility type, not for public use</xs:documentation>
  127.    <xs:documentation>
  128.    #all or (possibly empty) subset of {extension, restriction}</xs:documentation>
  129.   </xs:annotation>
  130.   <xs:union>
  131.    <xs:simpleType>    
  132.     <xs:restriction base="xs:token">
  133.      <xs:enumeration value="#all"/>
  134.     </xs:restriction>
  135.    </xs:simpleType>
  136.    <xs:simpleType>
  137.     <xs:list itemType="xs:reducedDerivationControl"/>
  138.    </xs:simpleType>
  139.   </xs:union>
  140.  </xs:simpleType>
  141.  
  142.  <xs:element name="schema" id="schema">
  143.   <xs:annotation>
  144.     <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>
  145.   </xs:annotation>
  146.   <xs:complexType>
  147.    <xs:complexContent>
  148.     <xs:extension base="xs:openAttrs">
  149.      <xs:sequence>
  150.       <xs:choice minOccurs="0" maxOccurs="unbounded">
  151.        <xs:element ref="xs:include"/>
  152.        <xs:element ref="xs:import"/>
  153.        <xs:element ref="xs:redefine"/>
  154.        <xs:element ref="xs:annotation"/>
  155.       </xs:choice>
  156.       <xs:sequence minOccurs="0" maxOccurs="unbounded">
  157.        <xs:group ref="xs:schemaTop"/>
  158.        <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>
  159.       </xs:sequence>
  160.      </xs:sequence>
  161.      <xs:attribute name="targetNamespace" type="xs:anyURI"/>
  162.      <xs:attribute name="version" type="xs:token"/>
  163.      <xs:attribute name="finalDefault" type="xs:derivationSet" use="optional" default=""/>
  164.      <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/>
  165.      <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
  166.      <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
  167.      <xs:attribute name="id" type="xs:ID"/>
  168.      <xs:attribute ref="xml:lang"/>
  169.     </xs:extension>
  170.    </xs:complexContent>
  171.   </xs:complexType>
  172.  
  173.   <xs:key name="element">
  174.    <xs:selector xpath="xs:element"/>
  175.    <xs:field xpath="@name"/>
  176.   </xs:key>
  177.  
  178.   <xs:key name="attribute">
  179.    <xs:selector xpath="xs:attribute"/>
  180.    <xs:field xpath="@name"/>
  181.   </xs:key>
  182.  
  183.   <xs:key name="type">
  184.    <xs:selector xpath="xs:complexType|xs:simpleType"/>
  185.    <xs:field xpath="@name"/>
  186.   </xs:key>
  187.  
  188.   <xs:key name="group">
  189.    <xs:selector xpath="xs:group"/>
  190.    <xs:field xpath="@name"/>
  191.   </xs:key>
  192.  
  193.   <xs:key name="attributeGroup">
  194.    <xs:selector xpath="xs:attributeGroup"/>
  195.    <xs:field xpath="@name"/>
  196.   </xs:key>
  197.  
  198.   <xs:key name="notation">
  199.    <xs:selector xpath="xs:notation"/>
  200.    <xs:field xpath="@name"/>
  201.   </xs:key>
  202.  
  203.   <xs:key name="identityConstraint">
  204.    <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
  205.    <xs:field xpath="@name"/>
  206.   </xs:key>
  207.  
  208.  </xs:element>
  209.  
  210.  <xs:simpleType name="allNNI">
  211.   <xs:annotation><xs:documentation>
  212.    for maxOccurs</xs:documentation></xs:annotation>
  213.   <xs:union memberTypes="xs:nonNegativeInteger">
  214.    <xs:simpleType>
  215.     <xs:restriction base="xs:NMTOKEN">
  216.      <xs:enumeration value="unbounded"/>
  217.     </xs:restriction>
  218.    </xs:simpleType>
  219.   </xs:union>
  220.  </xs:simpleType>
  221.  
  222.  <xs:attributeGroup name="occurs">
  223.   <xs:annotation><xs:documentation>
  224.    for all particles</xs:documentation></xs:annotation>
  225.   <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/>
  226.   <xs:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/>
  227.  </xs:attributeGroup>
  228.  
  229.  <xs:attributeGroup name="defRef">
  230.   <xs:annotation><xs:documentation>
  231.    for element, group and attributeGroup,
  232.    which both define and reference</xs:documentation></xs:annotation>
  233.   <xs:attribute name="name" type="xs:NCName"/>
  234.   <xs:attribute name="ref" type="xs:QName"/>
  235.  </xs:attributeGroup>
  236.  
  237.  <xs:group name="typeDefParticle">
  238.   <xs:annotation>
  239.     <xs:documentation>
  240.    'complexType' uses this</xs:documentation></xs:annotation>
  241.   <xs:choice>
  242.    <xs:element name="group" type="xs:groupRef"/>
  243.    <xs:element ref="xs:all"/>
  244.    <xs:element ref="xs:choice"/>
  245.    <xs:element ref="xs:sequence"/>
  246.   </xs:choice>
  247.  </xs:group>
  248.  
  249.  
  250.  
  251.  <xs:group name="nestedParticle">
  252.   <xs:choice>
  253.    <xs:element name="element" type="xs:localElement"/>
  254.    <xs:element name="group" type="xs:groupRef"/>
  255.    <xs:element ref="xs:choice"/>
  256.    <xs:element ref="xs:sequence"/>
  257.    <xs:element ref="xs:any"/>
  258.   </xs:choice>
  259.  </xs:group>
  260.  
  261.  <xs:group name="particle">
  262.   <xs:choice>
  263.    <xs:element name="element" type="xs:localElement"/>
  264.    <xs:element name="group" type="xs:groupRef"/>
  265.    <xs:element ref="xs:all"/>
  266.    <xs:element ref="xs:choice"/>
  267.    <xs:element ref="xs:sequence"/>
  268.    <xs:element ref="xs:any"/>
  269.   </xs:choice>
  270.  </xs:group>
  271.  
  272.  <xs:complexType name="attribute">
  273.   <xs:complexContent>
  274.    <xs:extension base="xs:annotated">
  275.     <xs:sequence>
  276.      <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
  277.     </xs:sequence>
  278.     <xs:attributeGroup ref="xs:defRef"/>
  279.     <xs:attribute name="type" type="xs:QName"/>
  280.     <xs:attribute name="use" use="optional" default="optional">
  281.      <xs:simpleType>
  282.       <xs:restriction base="xs:NMTOKEN">
  283.        <xs:enumeration value="prohibited"/>
  284.        <xs:enumeration value="optional"/>
  285.        <xs:enumeration value="required"/>
  286.       </xs:restriction>
  287.      </xs:simpleType>
  288.     </xs:attribute>
  289.     <xs:attribute name="default" type="xs:string"/>
  290.     <xs:attribute name="fixed" type="xs:string"/>
  291.     <xs:attribute name="form" type="xs:formChoice"/>
  292.    </xs:extension>
  293.   </xs:complexContent>
  294.  </xs:complexType>
  295.  
  296.  <xs:complexType name="topLevelAttribute">
  297.   <xs:complexContent>
  298.    <xs:restriction base="xs:attribute">
  299.     <xs:sequence>
  300.      <xs:element ref="xs:annotation" minOccurs="0"/>
  301.      <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
  302.     </xs:sequence>
  303.     <xs:attribute name="ref" use="prohibited"/>
  304.     <xs:attribute name="form" use="prohibited"/>
  305.     <xs:attribute name="use" use="prohibited"/>
  306.     <xs:attribute name="name" use="required" type="xs:NCName"/>
  307.    </xs:restriction>
  308.   </xs:complexContent>
  309.  </xs:complexType>
  310.  
  311.  <xs:group name="attrDecls">
  312.   <xs:sequence>
  313.    <xs:choice minOccurs="0" maxOccurs="unbounded">
  314.     <xs:element name="attribute" type="xs:attribute"/>
  315.     <xs:element name="attributeGroup" type="xs:attributeGroupRef"/>
  316.    </xs:choice>
  317.    <xs:element ref="xs:anyAttribute" minOccurs="0"/>
  318.   </xs:sequence>
  319.  </xs:group>
  320.  
  321.  <xs:element name="anyAttribute" type="xs:wildcard" id="anyAttribute">
  322.   <xs:annotation>
  323.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/>
  324.   </xs:annotation>
  325.  </xs:element>
  326.  
  327.  <xs:group name="complexTypeModel">
  328.   <xs:choice>
  329.       <xs:element ref="xs:simpleContent"/>
  330.       <xs:element ref="xs:complexContent"/>
  331.       <xs:sequence>
  332.        <xs:annotation>
  333.         <xs:documentation>
  334.    This branch is short for
  335.    <complexContent>
  336.    <restriction base="xs:anyType">
  337.    ...
  338.    </restriction>
  339.    </complexContent></xs:documentation>
  340.        </xs:annotation>
  341.        <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
  342.        <xs:group ref="xs:attrDecls"/>
  343.       </xs:sequence>
  344.   </xs:choice>
  345.  </xs:group>
  346.  
  347.  <xs:complexType name="complexType" abstract="true">
  348.   <xs:complexContent>
  349.    <xs:extension base="xs:annotated">
  350.     <xs:group ref="xs:complexTypeModel"/>
  351.     <xs:attribute name="name" type="xs:NCName">
  352.      <xs:annotation>
  353.       <xs:documentation>
  354.       Will be restricted to required or forbidden</xs:documentation>
  355.      </xs:annotation>
  356.     </xs:attribute>
  357.     <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">
  358.      <xs:annotation>
  359.       <xs:documentation>
  360.       Not allowed if simpleContent child is chosen.
  361.       May be overriden by setting on complexContent child.</xs:documentation>
  362.     </xs:annotation>
  363.     </xs:attribute>
  364.     <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
  365.     <xs:attribute name="final" type="xs:derivationSet"/>
  366.     <xs:attribute name="block" type="xs:derivationSet"/>
  367.    </xs:extension>
  368.   </xs:complexContent>
  369.  </xs:complexType>
  370.  
  371.  <xs:complexType name="topLevelComplexType">
  372.   <xs:complexContent>
  373.    <xs:restriction base="xs:complexType">
  374.     <xs:sequence>
  375.      <xs:element ref="xs:annotation" minOccurs="0"/>
  376.      <xs:group ref="xs:complexTypeModel"/>
  377.     </xs:sequence>
  378.     <xs:attribute name="name" type="xs:NCName" use="required"/>
  379.    </xs:restriction>
  380.   </xs:complexContent>
  381.  </xs:complexType>
  382.  
  383.  <xs:complexType name="localComplexType">
  384.   <xs:complexContent>
  385.    <xs:restriction base="xs:complexType">
  386.     <xs:sequence>
  387.      <xs:element ref="xs:annotation" minOccurs="0"/>
  388.      <xs:group ref="xs:complexTypeModel"/>
  389.     </xs:sequence>
  390.     <xs:attribute name="name" use="prohibited"/>
  391.     <xs:attribute name="abstract" use="prohibited"/>
  392.     <xs:attribute name="final" use="prohibited"/>
  393.     <xs:attribute name="block" use="prohibited"/>
  394.    </xs:restriction>
  395.   </xs:complexContent>
  396.  </xs:complexType>
  397.  
  398.  <xs:complexType name="restrictionType">
  399.   <xs:complexContent>
  400.    <xs:extension base="xs:annotated">
  401.     <xs:sequence>
  402.      <xs:choice>
  403.       <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
  404.       <xs:group ref="xs:simpleRestrictionModel" minOccurs="0"/>
  405.      </xs:choice>
  406.      <xs:group ref="xs:attrDecls"/>
  407.     </xs:sequence>
  408.     <xs:attribute name="base" type="xs:QName" use="required"/>
  409.    </xs:extension>
  410.   </xs:complexContent>       
  411.  </xs:complexType>
  412.  
  413.  <xs:complexType name="complexRestrictionType">
  414.   <xs:complexContent>
  415.    <xs:restriction base="xs:restrictionType">
  416.     <xs:sequence>
  417.      <xs:element ref="xs:annotation" minOccurs="0"/>
  418.      <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
  419.      <xs:group ref="xs:attrDecls"/>
  420.     </xs:sequence>
  421.    </xs:restriction>
  422.   </xs:complexContent>       
  423.  </xs:complexType>
  424.  
  425.  <xs:complexType name="extensionType">
  426.   <xs:complexContent>
  427.    <xs:extension base="xs:annotated">
  428.     <xs:sequence>
  429.      <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
  430.      <xs:group ref="xs:attrDecls"/>
  431.     </xs:sequence>
  432.     <xs:attribute name="base" type="xs:QName" use="required"/>
  433.    </xs:extension>
  434.   </xs:complexContent>       
  435.  </xs:complexType>
  436.  
  437.  <xs:element name="complexContent" id="complexContent">
  438.   <xs:annotation>
  439.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>
  440.   </xs:annotation>
  441.   <xs:complexType>
  442.    <xs:complexContent>
  443.     <xs:extension base="xs:annotated">
  444.      <xs:choice>
  445.       <xs:element name="restriction" type="xs:complexRestrictionType"/>
  446.       <xs:element name="extension" type="xs:extensionType"/>
  447.      </xs:choice>     
  448.      <xs:attribute name="mixed" type="xs:boolean">
  449.       <xs:annotation>
  450.        <xs:documentation>
  451.        Overrides any setting on complexType parent.</xs:documentation>
  452.       </xs:annotation>
  453.     </xs:attribute>
  454.     </xs:extension>
  455.    </xs:complexContent>
  456.   </xs:complexType>
  457.  </xs:element>
  458.  
  459.  <xs:complexType name="simpleRestrictionType">
  460.   <xs:complexContent>
  461.    <xs:restriction base="xs:restrictionType">
  462.     <xs:sequence>
  463.      <xs:element ref="xs:annotation" minOccurs="0"/>
  464.      <xs:group ref="xs:simpleRestrictionModel" minOccurs="0"/>
  465.      <xs:group ref="xs:attrDecls"/>
  466.     </xs:sequence>
  467.    </xs:restriction>
  468.   </xs:complexContent>
  469.  </xs:complexType>
  470.  
  471.  <xs:complexType name="simpleExtensionType">
  472.   <xs:complexContent>
  473.    <xs:restriction base="xs:extensionType">
  474.     <xs:sequence>
  475.      <xs:annotation>
  476.       <xs:documentation>
  477.       No typeDefParticle group reference</xs:documentation>
  478.      </xs:annotation>
  479.      <xs:element ref="xs:annotation" minOccurs="0"/>
  480.      <xs:group ref="xs:attrDecls"/>
  481.     </xs:sequence>
  482.    </xs:restriction>
  483.   </xs:complexContent>
  484.  </xs:complexType>
  485.  
  486.  <xs:element name="simpleContent" id="simpleContent">
  487.   <xs:annotation>
  488.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>
  489.   </xs:annotation>
  490.   <xs:complexType>
  491.    <xs:complexContent>
  492.     <xs:extension base="xs:annotated">
  493.      <xs:choice>
  494.       <xs:element name="restriction" type="xs:simpleRestrictionType"/>
  495.       <xs:element name="extension" type="xs:simpleExtensionType"/>
  496.      </xs:choice>
  497.     </xs:extension>
  498.    </xs:complexContent>
  499.   </xs:complexType>
  500.  </xs:element>
  501.  
  502.  <xs:element name="complexType" type="xs:topLevelComplexType" id="complexType">
  503.   <xs:annotation>
  504.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>
  505.   </xs:annotation>
  506.  </xs:element>
  507.  
  508.  
  509.   <xs:simpleType name="blockSet">
  510.    <xs:annotation>
  511.     <xs:documentation>
  512.     A utility type, not for public use</xs:documentation>
  513.     <xs:documentation>
  514.     #all or (possibly empty) subset of {substitution, extension,
  515.     restriction}</xs:documentation>
  516.    </xs:annotation>
  517.    <xs:union>
  518.     <xs:simpleType>    
  519.      <xs:restriction base="xs:token">
  520.       <xs:enumeration value="#all"/>
  521.      </xs:restriction>
  522.     </xs:simpleType>
  523.     <xs:simpleType>
  524.      <xs:list>
  525.       <xs:simpleType>
  526.        <xs:restriction base="xs:derivationControl">
  527.         <xs:enumeration value="extension"/>
  528.         <xs:enumeration value="restriction"/>
  529.         <xs:enumeration value="substitution"/>
  530.        </xs:restriction>
  531.       </xs:simpleType>
  532.      </xs:list>
  533.     </xs:simpleType>
  534.    </xs:union>  
  535.   </xs:simpleType>
  536.  
  537.  <xs:complexType name="element" abstract="true">
  538.   <xs:annotation>
  539.    <xs:documentation>
  540.    The element element can be used either
  541.    at the top level to define an element-type binding globally,
  542.    or within a content model to either reference a globally-defined
  543.    element or type or declare an element-type binding locally.
  544.    The ref form is not allowed at the top level.</xs:documentation>
  545.   </xs:annotation>
  546.  
  547.   <xs:complexContent>
  548.    <xs:extension base="xs:annotated">
  549.     <xs:sequence>
  550.      <xs:choice minOccurs="0">
  551.       <xs:element name="simpleType" type="xs:localSimpleType"/>
  552.       <xs:element name="complexType" type="xs:localComplexType"/>
  553.      </xs:choice>
  554.      <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
  555.     </xs:sequence>
  556.     <xs:attributeGroup ref="xs:defRef"/>
  557.     <xs:attribute name="type" type="xs:QName"/>
  558.     <xs:attribute name="substitutionGroup" type="xs:QName"/>
  559.     <xs:attributeGroup ref="xs:occurs"/>
  560.     <xs:attribute name="default" type="xs:string"/>
  561.     <xs:attribute name="fixed" type="xs:string"/>
  562.     <xs:attribute name="nillable" type="xs:boolean" use="optional" default="false"/>
  563.     <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
  564.     <xs:attribute name="final" type="xs:derivationSet"/>
  565.     <xs:attribute name="block" type="xs:blockSet"/>
  566.     <xs:attribute name="form" type="xs:formChoice"/>
  567.    </xs:extension>
  568.   </xs:complexContent>
  569.  </xs:complexType>
  570.  
  571.  <xs:complexType name="topLevelElement">
  572.   <xs:complexContent>
  573.    <xs:restriction base="xs:element">
  574.     <xs:sequence>
  575.      <xs:element ref="xs:annotation" minOccurs="0"/>
  576.      <xs:choice minOccurs="0">
  577.       <xs:element name="simpleType" type="xs:localSimpleType"/>
  578.       <xs:element name="complexType" type="xs:localComplexType"/>
  579.      </xs:choice>
  580.      <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
  581.     </xs:sequence>
  582.     <xs:attribute name="ref" use="prohibited"/>
  583.     <xs:attribute name="form" use="prohibited"/>
  584.     <xs:attribute name="minOccurs" use="prohibited"/>
  585.     <xs:attribute name="maxOccurs" use="prohibited"/>
  586.     <xs:attribute name="name" use="required" type="xs:NCName"/>
  587.    </xs:restriction>
  588.   </xs:complexContent>
  589.  </xs:complexType>
  590.  
  591.  <xs:complexType name="localElement">
  592.   <xs:complexContent>
  593.    <xs:restriction base="xs:element">
  594.     <xs:sequence>
  595.      <xs:element ref="xs:annotation" minOccurs="0"/>
  596.      <xs:choice minOccurs="0">
  597.       <xs:element name="simpleType" type="xs:localSimpleType"/>
  598.       <xs:element name="complexType" type="xs:localComplexType"/>
  599.      </xs:choice>
  600.      <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
  601.     </xs:sequence>
  602.     <xs:attribute name="substitutionGroup" use="prohibited"/>
  603.     <xs:attribute name="final" use="prohibited"/>
  604.     <xs:attribute name="abstract" use="prohibited"/>
  605.    </xs:restriction>
  606.   </xs:complexContent>
  607.  </xs:complexType>
  608.  
  609.  <xs:element name="element" type="xs:topLevelElement" id="element">
  610.   <xs:annotation>
  611.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>
  612.   </xs:annotation>
  613.  </xs:element>
  614.  
  615.  <xs:complexType name="group" abstract="true">
  616.   <xs:annotation>
  617.    <xs:documentation>
  618.    group type for explicit groups, named top-level groups and
  619.    group references</xs:documentation>
  620.   </xs:annotation>
  621.   <xs:complexContent>
  622.    <xs:extension base="xs:annotated">
  623.     <xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/>
  624.     <xs:attributeGroup ref="xs:defRef"/>
  625.     <xs:attributeGroup ref="xs:occurs"/>
  626.    </xs:extension>
  627.   </xs:complexContent>
  628.  </xs:complexType>
  629.  
  630.  <xs:complexType name="realGroup">
  631.   <xs:complexContent>
  632.    <xs:restriction base="xs:group">
  633.     <xs:sequence>
  634.      <xs:element ref="xs:annotation" minOccurs="0"/>
  635.      <xs:choice minOccurs="0" maxOccurs="1">
  636.       <xs:element ref="xs:all"/>
  637.       <xs:element ref="xs:choice"/>
  638.       <xs:element ref="xs:sequence"/>
  639.      </xs:choice>
  640.     </xs:sequence>
  641.    </xs:restriction>
  642.   </xs:complexContent>
  643.  </xs:complexType>
  644.  
  645.  <xs:complexType name="namedGroup">
  646.   <xs:annotation>
  647.    <xs:documentation>Should derive this from realGroup, but too complicated 
  648.                       for now</xs:documentation>
  649.   </xs:annotation>
  650.   <xs:sequence>
  651.      <xs:element ref="xs:annotation" minOccurs="0"/>
  652.      <xs:choice minOccurs="1" maxOccurs="1">
  653.       <xs:element name="all">
  654.        <xs:complexType>
  655.         <xs:complexContent>
  656.          <xs:restriction base="xs:all">
  657.           <xs:group ref="xs:allModel"/>
  658.           <xs:attribute name="minOccurs" use="prohibited"/>
  659.           <xs:attribute name="maxOccurs" use="prohibited"/>
  660.          </xs:restriction>
  661.         </xs:complexContent>
  662.        </xs:complexType>
  663.       </xs:element>
  664.       <xs:element name="choice" type="xs:simpleExplicitGroup"/>
  665.       <xs:element name="sequence" type="xs:simpleExplicitGroup"/>
  666.      </xs:choice>
  667.     </xs:sequence>
  668.     <xs:attribute name="name" use="required" type="xs:NCName"/>
  669.     <xs:attribute name="ref" use="prohibited"/>
  670.     <xs:attribute name="minOccurs" use="prohibited"/>
  671.     <xs:attribute name="maxOccurs" use="prohibited"/>
  672.  </xs:complexType>
  673.  
  674.  <xs:complexType name="groupRef">
  675.   <xs:complexContent>
  676.    <xs:restriction base="xs:realGroup">
  677.     <xs:sequence>
  678.      <xs:element ref="xs:annotation" minOccurs="0"/>
  679.     </xs:sequence>
  680.     <xs:attribute name="ref" use="required" type="xs:QName"/>
  681.     <xs:attribute name="name" use="prohibited"/>
  682.    </xs:restriction>
  683.   </xs:complexContent>
  684.  </xs:complexType>
  685.  
  686.  <xs:complexType name="explicitGroup">
  687.   <xs:annotation>
  688.    <xs:documentation>
  689.    group type for the three kinds of group</xs:documentation>
  690.   </xs:annotation>
  691.   <xs:complexContent>
  692.    <xs:restriction base="xs:group">
  693.     <xs:sequence>
  694.      <xs:element ref="xs:annotation" minOccurs="0"/>
  695.      <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
  696.     </xs:sequence>
  697.     <xs:attribute name="name" type="xs:NCName" use="prohibited"/>
  698.     <xs:attribute name="ref" type="xs:QName" use="prohibited"/>
  699.    </xs:restriction>
  700.   </xs:complexContent>
  701.  </xs:complexType>
  702.  
  703.  <xs:complexType name="simpleExplicitGroup">
  704.   <xs:complexContent>
  705.    <xs:restriction base="xs:explicitGroup">
  706.     <xs:sequence>
  707.      <xs:element ref="xs:annotation" minOccurs="0"/>
  708.      <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
  709.     </xs:sequence>
  710.     <xs:attribute name="minOccurs" use="prohibited"/>
  711.     <xs:attribute name="maxOccurs" use="prohibited"/>
  712.    </xs:restriction>
  713.   </xs:complexContent>
  714.  </xs:complexType>
  715.  
  716.  <xs:group name="allModel">
  717.   <xs:sequence>
  718.       <xs:element ref="xs:annotation" minOccurs="0"/>
  719.       <xs:element name="element" minOccurs="0" maxOccurs="unbounded">
  720.        <xs:complexType>
  721.         <xs:annotation>
  722.          <xs:documentation>restricted max/min</xs:documentation>
  723.         </xs:annotation>
  724.         <xs:complexContent>
  725.          <xs:restriction base="xs:localElement">
  726.           <xs:sequence>
  727.            <xs:element ref="xs:annotation" minOccurs="0"/>
  728.            <xs:choice minOccurs="0">
  729.             <xs:element name="simpleType" type="xs:localSimpleType"/>
  730.             <xs:element name="complexType" type="xs:localComplexType"/>
  731.            </xs:choice>
  732.            <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
  733.           </xs:sequence>
  734.           <xs:attribute name="minOccurs" use="optional" default="1">
  735.            <xs:simpleType>
  736.             <xs:restriction base="xs:nonNegativeInteger">
  737.              <xs:enumeration value="0"/>
  738.              <xs:enumeration value="1"/>
  739.             </xs:restriction>
  740.            </xs:simpleType>
  741.           </xs:attribute>
  742.           <xs:attribute name="maxOccurs" use="optional" default="1">
  743.            <xs:simpleType>
  744.             <xs:restriction base="xs:allNNI">
  745.              <xs:enumeration value="0"/>
  746.              <xs:enumeration value="1"/>
  747.             </xs:restriction>
  748.            </xs:simpleType>
  749.           </xs:attribute>
  750.          </xs:restriction>
  751.         </xs:complexContent>
  752.        </xs:complexType>    
  753.       </xs:element>
  754.      </xs:sequence>
  755.  </xs:group>
  756.  
  757.   <xs:complexType name="all">
  758.    <xs:annotation>
  759.     <xs:documentation>
  760.    Only elements allowed inside</xs:documentation>
  761.    </xs:annotation>
  762.    <xs:complexContent>
  763.     <xs:restriction base="xs:explicitGroup">
  764.      <xs:group ref="xs:allModel"/>
  765.      <xs:attribute name="minOccurs" use="optional" default="1">
  766.       <xs:simpleType>
  767.        <xs:restriction base="xs:nonNegativeInteger">
  768.         <xs:enumeration value="0"/>
  769.         <xs:enumeration value="1"/>
  770.        </xs:restriction>
  771.       </xs:simpleType>
  772.      </xs:attribute>
  773.      <xs:attribute name="maxOccurs" use="optional" default="1">
  774.       <xs:simpleType>
  775.        <xs:restriction base="xs:allNNI">
  776.         <xs:enumeration value="1"/>
  777.        </xs:restriction>
  778.       </xs:simpleType>
  779.      </xs:attribute>
  780.     </xs:restriction>
  781.    </xs:complexContent>
  782.   </xs:complexType>
  783.  
  784.  <xs:element name="all" id="all" type="xs:all">
  785.   <xs:annotation>
  786.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/>
  787.   </xs:annotation>
  788.  </xs:element>
  789.  
  790.  <xs:element name="choice" type="xs:explicitGroup" id="choice">
  791.   <xs:annotation>
  792.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>
  793.   </xs:annotation>
  794.  </xs:element>
  795.  
  796.  <xs:element name="sequence" type="xs:explicitGroup" id="sequence">
  797.   <xs:annotation>
  798.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>
  799.   </xs:annotation>
  800.  </xs:element>
  801.  
  802.  <xs:element name="group" type="xs:namedGroup" id="group">
  803.   <xs:annotation>
  804.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>
  805.   </xs:annotation>
  806.  </xs:element>
  807.  
  808.  <xs:complexType name="wildcard">
  809.   <xs:complexContent>
  810.    <xs:extension base="xs:annotated">
  811.     <xs:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/>
  812.     <xs:attribute name="processContents" use="optional" default="strict">
  813.      <xs:simpleType>
  814.       <xs:restriction base="xs:NMTOKEN">
  815.        <xs:enumeration value="skip"/>
  816.        <xs:enumeration value="lax"/>
  817.        <xs:enumeration value="strict"/>
  818.       </xs:restriction>
  819.      </xs:simpleType>
  820.     </xs:attribute>
  821.    </xs:extension>
  822.   </xs:complexContent>
  823.  </xs:complexType>
  824.  
  825.  <xs:element name="any" id="any">
  826.   <xs:annotation>
  827.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>
  828.   </xs:annotation>
  829.   <xs:complexType>
  830.    <xs:complexContent>
  831.     <xs:extension base="xs:wildcard">
  832.      <xs:attributeGroup ref="xs:occurs"/>
  833.     </xs:extension>
  834.    </xs:complexContent>
  835.   </xs:complexType>
  836.  </xs:element>
  837.  
  838.   <xs:annotation>
  839.    <xs:documentation>
  840.    simple type for the value of the 'namespace' attr of
  841.    'any' and 'anyAttribute'</xs:documentation>
  842.   </xs:annotation>
  843.   <xs:annotation>
  844.    <xs:documentation>
  845.    Value is
  846.               ##any      - - any non-conflicting WFXML/attribute at all
  847.  
  848.               ##other    - - any non-conflicting WFXML/attribute from
  849.                               namespace other than targetNS
  850.  
  851.               ##local    - - any unqualified non-conflicting WFXML/attribute 
  852.  
  853.               one or     - - any non-conflicting WFXML/attribute from
  854.               more URI        the listed namespaces
  855.               references
  856.               (space separated)
  857.  
  858.     ##targetNamespace or ##local may appear in the above list, to
  859.         refer to the targetNamespace of the enclosing
  860.         schema or an absent targetNamespace respectively</xs:documentation>
  861.   </xs:annotation>
  862.  
  863.  <xs:simpleType name="namespaceList">
  864.   <xs:annotation>
  865.    <xs:documentation>
  866.    A utility type, not for public use</xs:documentation>
  867.   </xs:annotation>
  868.   <xs:union>
  869.    <xs:simpleType>
  870.     <xs:restriction base="xs:token">
  871.      <xs:enumeration value="##any"/>
  872.      <xs:enumeration value="##other"/>
  873.     </xs:restriction>
  874.    </xs:simpleType>
  875.    <xs:simpleType>
  876.     <xs:list>
  877.      <xs:simpleType>
  878.       <xs:union memberTypes="xs:anyURI">
  879.        <xs:simpleType>
  880.         <xs:restriction base="xs:token">
  881.          <xs:enumeration value="##targetNamespace"/>
  882.          <xs:enumeration value="##local"/>
  883.         </xs:restriction>
  884.        </xs:simpleType>
  885.       </xs:union>
  886.      </xs:simpleType>
  887.     </xs:list>
  888.    </xs:simpleType>
  889.   </xs:union>
  890.  </xs:simpleType>
  891.  
  892.  <xs:element name="attribute" type="xs:topLevelAttribute" id="attribute">
  893.   <xs:annotation>
  894.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>
  895.   </xs:annotation>
  896.  </xs:element>
  897.  
  898.  <xs:complexType name="attributeGroup" abstract="true">
  899.   <xs:complexContent>
  900.    <xs:extension base="xs:annotated">
  901.     <xs:group ref="xs:attrDecls"/>
  902.     <xs:attributeGroup ref="xs:defRef"/>
  903.    </xs:extension>
  904.   </xs:complexContent>
  905.  </xs:complexType>
  906.  
  907.  <xs:complexType name="namedAttributeGroup">
  908.   <xs:complexContent>
  909.    <xs:restriction base="xs:attributeGroup">
  910.     <xs:sequence>
  911.      <xs:element ref="xs:annotation" minOccurs="0"/>
  912.      <xs:group ref="xs:attrDecls"/>
  913.     </xs:sequence>
  914.     <xs:attribute name="name" use="required" type="xs:NCName"/>
  915.     <xs:attribute name="ref" use="prohibited"/>
  916.    </xs:restriction>
  917.   </xs:complexContent>
  918.  </xs:complexType>
  919.  
  920.  <xs:complexType name="attributeGroupRef">
  921.   <xs:complexContent>
  922.    <xs:restriction base="xs:attributeGroup">
  923.     <xs:sequence>
  924.      <xs:element ref="xs:annotation" minOccurs="0"/>
  925.     </xs:sequence>
  926.     <xs:attribute name="ref" use="required" type="xs:QName"/>
  927.     <xs:attribute name="name" use="prohibited"/>
  928.    </xs:restriction>
  929.   </xs:complexContent>
  930.  </xs:complexType>
  931.  
  932.  <xs:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup">
  933.   <xs:annotation>
  934.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>
  935.   </xs:annotation>
  936.  </xs:element>
  937.  
  938.  <xs:element name="include" id="include">
  939.   <xs:annotation>
  940.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/>
  941.   </xs:annotation>
  942.   <xs:complexType>
  943.    <xs:complexContent>
  944.     <xs:extension base="xs:annotated">
  945.      <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
  946.     </xs:extension>
  947.    </xs:complexContent>
  948.   </xs:complexType>
  949.  </xs:element>
  950.  
  951.  <xs:element name="redefine" id="redefine">
  952.   <xs:annotation>
  953.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/>
  954.   </xs:annotation>
  955.   <xs:complexType>
  956.    <xs:complexContent>
  957.     <xs:extension base="xs:openAttrs">
  958.      <xs:choice minOccurs="0" maxOccurs="unbounded">
  959.       <xs:element ref="xs:annotation"/>
  960.       <xs:group ref="xs:redefinable"/>
  961.      </xs:choice>
  962.      <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
  963.      <xs:attribute name="id" type="xs:ID"/>
  964.     </xs:extension>
  965.    </xs:complexContent>
  966.   </xs:complexType>
  967.  </xs:element>
  968.  
  969.  <xs:element name="import" id="import">
  970.   <xs:annotation>
  971.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/>
  972.   </xs:annotation>
  973.   <xs:complexType>
  974.    <xs:complexContent>
  975.     <xs:extension base="xs:annotated">
  976.      <xs:attribute name="namespace" type="xs:anyURI"/>
  977.      <xs:attribute name="schemaLocation" type="xs:anyURI"/>
  978.     </xs:extension>
  979.    </xs:complexContent>
  980.   </xs:complexType>
  981.  </xs:element>
  982.  
  983.  <xs:element name="selector" id="selector">
  984.   <xs:annotation>
  985.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>
  986.   </xs:annotation>
  987.   <xs:complexType>
  988.   <xs:complexContent>
  989.    <xs:extension base="xs:annotated">
  990.      <xs:attribute name="xpath" use="required">
  991.       <xs:simpleType>
  992.        <xs:annotation>
  993.         <xs:documentation>A subset of XPath expressions for use
  994. in selectors</xs:documentation>
  995.         <xs:documentation>A utility type, not for public
  996. use</xs:documentation>
  997.        </xs:annotation>
  998.        <xs:restriction base="xs:token">
  999.         <xs:annotation>
  1000.          <xs:documentation>The following pattern is intended to allow XPath
  1001.                            expressions per the following EBNF:
  1002.           Selector    ::=    Path ( '|' Path )*  
  1003.           Path    ::=    ('.//')? Step ( '/' Step )*  
  1004.           Step    ::=    '.' | NameTest  
  1005.           NameTest    ::=    QName | '*' | NCName ':' '*'  
  1006.                            child:: is also allowed
  1007.          </xs:documentation>
  1008.         </xs:annotation>
  1009.         <xs:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">
  1010.         </xs:pattern>
  1011.        </xs:restriction>
  1012.       </xs:simpleType>
  1013.      </xs:attribute>
  1014.    </xs:extension>
  1015.   </xs:complexContent>
  1016.  </xs:complexType>
  1017.  </xs:element>
  1018.  
  1019.  <xs:element name="field" id="field">
  1020.   <xs:annotation>
  1021.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>
  1022.   </xs:annotation>
  1023.   <xs:complexType>
  1024.   <xs:complexContent>
  1025.    <xs:extension base="xs:annotated">
  1026.      <xs:attribute name="xpath" use="required">
  1027.       <xs:simpleType>
  1028.        <xs:annotation>
  1029.         <xs:documentation>A subset of XPath expressions for use
  1030. in fields</xs:documentation>
  1031.         <xs:documentation>A utility type, not for public
  1032. use</xs:documentation>
  1033.        </xs:annotation>
  1034.        <xs:restriction base="xs:token">
  1035.         <xs:annotation>
  1036.          <xs:documentation>The following pattern is intended to allow XPath
  1037.                            expressions per the same EBNF as for selector,
  1038.                            with the following change:
  1039.           Path    ::=    ('.//')? ( Step '/' )* ( Step | '@' NameTest ) 
  1040.          </xs:documentation>
  1041.         </xs:annotation>
  1042.         <xs:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*">
  1043.         </xs:pattern>
  1044.        </xs:restriction>
  1045.       </xs:simpleType>
  1046.      </xs:attribute>
  1047.    </xs:extension>
  1048.   </xs:complexContent>
  1049.  </xs:complexType>
  1050.  </xs:element>
  1051.  
  1052.  <xs:complexType name="keybase">
  1053.   <xs:complexContent>
  1054.    <xs:extension base="xs:annotated">
  1055.     <xs:sequence>
  1056.      <xs:element ref="xs:selector"/>
  1057.      <xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/>
  1058.     </xs:sequence>
  1059.     <xs:attribute name="name" type="xs:NCName" use="required"/>
  1060.    </xs:extension>
  1061.   </xs:complexContent>
  1062.  </xs:complexType>
  1063.  
  1064.  <xs:group name="identityConstraint">
  1065.   <xs:annotation>
  1066.    <xs:documentation>The three kinds of identity constraints, all with
  1067.                      type of or derived from 'keybase'.
  1068.    </xs:documentation>
  1069.   </xs:annotation>
  1070.   <xs:choice>
  1071.    <xs:element ref="xs:unique"/>
  1072.    <xs:element ref="xs:key"/>
  1073.    <xs:element ref="xs:keyref"/>
  1074.   </xs:choice>
  1075.  </xs:group>
  1076.  
  1077.  <xs:element name="unique" type="xs:keybase" id="unique">
  1078.   <xs:annotation>
  1079.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/>
  1080.   </xs:annotation>
  1081.  </xs:element>
  1082.  <xs:element name="key" type="xs:keybase" id="key">
  1083.   <xs:annotation>
  1084.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/>
  1085.   </xs:annotation>
  1086.  </xs:element>
  1087.  <xs:element name="keyref" id="keyref">
  1088.   <xs:annotation>
  1089.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/>
  1090.   </xs:annotation>
  1091.   <xs:complexType>
  1092.    <xs:complexContent>
  1093.     <xs:extension base="xs:keybase">
  1094.      <xs:attribute name="refer" type="xs:QName" use="required"/>
  1095.     </xs:extension>
  1096.    </xs:complexContent>
  1097.   </xs:complexType>
  1098.  </xs:element>
  1099.  
  1100.  <xs:element name="notation" id="notation">
  1101.   <xs:annotation>
  1102.    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>
  1103.   </xs:annotation>
  1104.   <xs:complexType>
  1105.    <xs:complexContent>
  1106.     <xs:extension base="xs:annotated">
  1107.      <xs:attribute name="name" type="xs:NCName" use="required"/>
  1108.      <xs:attribute name="public" type="xs:public" use="required"/>
  1109.      <xs:attribute name="system" type="xs:anyURI"/>
  1110.     </xs:extension>
  1111.    </xs:complexContent>
  1112.   </xs:complexType>
  1113.  </xs:element>
  1114.  
  1115.  <xs:simpleType name="public">
  1116.   <xs:annotation>
  1117.    <xs:documentation>
  1118.    A utility type, not for public use</xs:documentation>
  1119.    <xs:documentation>
  1120.    A public identifier, per ISO 8879</xs:documentation>
  1121.   </xs:annotation>
  1122.   <xs:restriction base="xs:token"/>
  1123.  </xs:simpleType>
  1124.  
  1125.  <xs:element name="appinfo" id="appinfo">
  1126.    <xs:annotation>
  1127.      <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/>
  1128.    </xs:annotation>
  1129.    <xs:complexType mixed="true">
  1130.      <xs:sequence minOccurs="0" maxOccurs="unbounded">
  1131.        <xs:any processContents="lax"/>
  1132.      </xs:sequence>
  1133.      <xs:attribute name="source" type="xs:anyURI"/>
  1134.    </xs:complexType>
  1135.  </xs:element>
  1136.  
  1137.  <xs:element name="documentation" id="documentation">
  1138.    <xs:annotation>
  1139.      <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/>
  1140.    </xs:annotation>
  1141.    <xs:complexType mixed="true">
  1142.      <xs:sequence minOccurs="0" maxOccurs="unbounded">
  1143.        <xs:any processContents="lax"/>
  1144.      </xs:sequence>
  1145.      <xs:attribute name="source" type="xs:anyURI"/>
  1146.    <xs:attribute ref="xml:lang"/>
  1147.    </xs:complexType>
  1148.  </xs:element>
  1149.  
  1150.  <xs:element name="annotation" id="annotation">
  1151.    <xs:annotation>
  1152.      <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/>
  1153.    </xs:annotation>
  1154.    <xs:complexType>
  1155.     <xs:complexContent>
  1156.      <xs:extension base="xs:openAttrs">
  1157.       <xs:choice minOccurs="0" maxOccurs="unbounded">
  1158.        <xs:element ref="xs:appinfo"/>
  1159.        <xs:element ref="xs:documentation"/>
  1160.       </xs:choice>
  1161.       <xs:attribute name="id" type="xs:ID"/>
  1162.      </xs:extension>
  1163.     </xs:complexContent>
  1164.    </xs:complexType>
  1165.  </xs:element>
  1166.  
  1167.  <xs:annotation>
  1168.   <xs:documentation>
  1169.    notations for use within XML Schema schemas</xs:documentation>
  1170.  </xs:annotation>
  1171.  
  1172.  <xs:notation name="XMLSchemaStructures" public="structures" system="http://www.w3.org/2000/08/XMLSchema.xsd"/>
  1173.  <xs:notation name="XML" public="REC-xml-19980210" system="http://www.w3.org/TR/1998/REC-xml-19980210"/>
  1174.  
  1175.  <xs:complexType name="anyType" mixed="true">
  1176.   <xs:annotation>
  1177.    <xs:documentation>
  1178.    Not the real urType, but as close an approximation as we can
  1179.    get in the XML representation</xs:documentation>
  1180.   </xs:annotation>
  1181.   <xs:sequence>
  1182.    <xs:any minOccurs="0" maxOccurs="unbounded"/>
  1183.   </xs:sequence>
  1184.   <xs:anyAttribute/>
  1185.  </xs:complexType>
  1186.  
  1187.   <xs:annotation>
  1188.     <xs:documentation>
  1189.       First the built-in primitive datatypes.  These definitions are for
  1190.       information only, the real built-in definitions are magic.  Note in
  1191.       particular that there is no type named 'anySimpleType'.  The
  1192.       primitives should really be derived from no type at all, and
  1193.       anySimpleType should be derived as a union of all the primitives.
  1194.     </xs:documentation>
  1195.  
  1196.     <xs:documentation>
  1197.       For each built-in datatype in this schema (both primitive and
  1198.       derived) can be uniquely addressed via a URI constructed
  1199.       as follows:
  1200.         1) the base URI is the URI of the XML Schema namespace
  1201.         2) the fragment identifier is the name of the datatype
  1202.         
  1203.       For example, to address the int datatype, the URI is:
  1204.       
  1205.         http://www.w3.org/2001/XMLSchema#int
  1206.       
  1207.       Additionally, each facet definition element can be uniquely
  1208.       addressed via a URI constructed as follows:
  1209.         1) the base URI is the URI of the XML Schema namespace
  1210.         2) the fragment identifier is the name of the facet
  1211.         
  1212.       For example, to address the maxInclusive facet, the URI is:
  1213.       
  1214.         http://www.w3.org/2001/XMLSchema#maxInclusive
  1215.  
  1216.       Additionally, each facet usage in a built-in datatype definition
  1217.       can be uniquely addressed via a URI constructed as follows:
  1218.         1) the base URI is the URI of the XML Schema namespace
  1219.         2) the fragment identifier is the name of the datatype, followed
  1220.            by a period (".") followed by the name of the facet
  1221.         
  1222.       For example, to address the usage of the maxInclusive facet in
  1223.       the definition of int, the URI is:
  1224.       
  1225.         http://www.w3.org/2001/XMLSchema#int.maxInclusive
  1226.         
  1227.     </xs:documentation>
  1228.   </xs:annotation>
  1229.  
  1230.   <xs:simpleType name="string" id="string">
  1231.     <xs:annotation>
  1232.       <xs:appinfo>
  1233.         <hfp:hasFacet name="length"/>
  1234.         <hfp:hasFacet name="minLength"/>
  1235.         <hfp:hasFacet name="maxLength"/>
  1236.         <hfp:hasFacet name="pattern"/>
  1237.         <hfp:hasFacet name="enumeration"/>
  1238.         <hfp:hasFacet name="whiteSpace"/>
  1239.         <hfp:hasProperty name="ordered" value="false"/>
  1240.         <hfp:hasProperty name="bounded" value="false"/>
  1241.         <hfp:hasProperty name="cardinality" value="countably infinite"/>
  1242.         <hfp:hasProperty name="numeric" value="false"/>
  1243.       </xs:appinfo>
  1244.       <xs:documentation
  1245.                 source="http://www.w3.org/TR/xmlschema-2/#string"/>
  1246.     </xs:annotation>
  1247.     <xs:restriction base="xs:anySimpleType">
  1248.       <xs:whiteSpace value="preserve" id="string.preserve"/>
  1249.     </xs:restriction>
  1250.   </xs:simpleType>
  1251.  
  1252.   <xs:simpleType name="boolean" id="boolean">
  1253.     <xs:annotation>
  1254.       <xs:appinfo>
  1255.         <hfp:hasFacet name="pattern"/>
  1256.         <hfp:hasFacet name="whiteSpace"/>
  1257.         <hfp:hasProperty name="ordered" value="false"/>
  1258.         <hfp:hasProperty name="bounded" value="false"/>
  1259.         <hfp:hasProperty name="cardinality" value="finite"/>
  1260.         <hfp:hasProperty name="numeric" value="false"/>
  1261.       </xs:appinfo>
  1262.       <xs:documentation
  1263.         source="http://www.w3.org/TR/xmlschema-2/#boolean"/>
  1264.     </xs:annotation>
  1265.     <xs:restriction base="xs:anySimpleType">
  1266.       <xs:whiteSpace value="collapse" fixed="true"
  1267.         id="boolean.whiteSpace"/>
  1268.     </xs:restriction>
  1269.   </xs:simpleType>
  1270.  
  1271.   <xs:simpleType name="float" id="float">
  1272.     <xs:annotation>
  1273.       <xs:appinfo>
  1274.         <hfp:hasFacet name="pattern"/>
  1275.         <hfp:hasFacet name="enumeration"/>
  1276.         <hfp:hasFacet name="whiteSpace"/>
  1277.         <hfp:hasFacet name="maxInclusive"/>
  1278.         <hfp:hasFacet name="maxExclusive"/>
  1279.         <hfp:hasFacet name="minInclusive"/>
  1280.         <hfp:hasFacet name="minExclusive"/>
  1281.         <hfp:hasProperty name="ordered" value="total"/>
  1282.         <hfp:hasProperty name="bounded" value="true"/>
  1283.         <hfp:hasProperty name="cardinality" value="finite"/>
  1284.         <hfp:hasProperty name="numeric" value="true"/>
  1285.       </xs:appinfo>
  1286.       <xs:documentation
  1287.         source="http://www.w3.org/TR/xmlschema-2/#float"/>
  1288.     </xs:annotation>
  1289.     <xs:restriction base="xs:anySimpleType">
  1290.       <xs:whiteSpace value="collapse" fixed="true"
  1291.         id="float.whiteSpace"/>
  1292.     </xs:restriction>
  1293.   </xs:simpleType>
  1294.  
  1295.   <xs:simpleType name="double" id="double">
  1296.     <xs:annotation>
  1297.       <xs:appinfo>
  1298.         <hfp:hasFacet name="pattern"/>
  1299.         <hfp:hasFacet name="enumeration"/>
  1300.         <hfp:hasFacet name="whiteSpace"/>
  1301.         <hfp:hasFacet name="maxInclusive"/>
  1302.         <hfp:hasFacet name="maxExclusive"/>
  1303.         <hfp:hasFacet name="minInclusive"/>
  1304.         <hfp:hasFacet name="minExclusive"/>
  1305.         <hfp:hasProperty name="ordered" value="total"/>
  1306.         <hfp:hasProperty name="bounded" value="true"/>
  1307.         <hfp:hasProperty name="cardinality" value="finite"/>
  1308.         <hfp:hasProperty name="numeric" value="true"/>
  1309.       </xs:appinfo>
  1310.       <xs:documentation
  1311.         source="http://www.w3.org/TR/xmlschema-2/#double"/>
  1312.     </xs:annotation>
  1313.     <xs:restriction base="xs:anySimpleType">
  1314.       <xs:whiteSpace value="collapse"  fixed="true"
  1315.         id="double.whiteSpace"/>
  1316.     </xs:restriction>
  1317.   </xs:simpleType>
  1318.  
  1319.   <xs:simpleType name="decimal" id="decimal">
  1320.     <xs:annotation>
  1321.       <xs:appinfo>
  1322.         <hfp:hasFacet name="totalDigits"/>
  1323.         <hfp:hasFacet name="fractionDigits"/>
  1324.         <hfp:hasFacet name="pattern"/>
  1325.         <hfp:hasFacet name="whiteSpace"/>
  1326.         <hfp:hasFacet name="enumeration"/>
  1327.         <hfp:hasFacet name="maxInclusive"/>
  1328.         <hfp:hasFacet name="maxExclusive"/>
  1329.         <hfp:hasFacet name="minInclusive"/>
  1330.         <hfp:hasFacet name="minExclusive"/>
  1331.         <hfp:hasProperty name="ordered" value="total"/>
  1332.         <hfp:hasProperty name="bounded" value="false"/>
  1333.         <hfp:hasProperty name="cardinality"
  1334.                 value="countably infinite"/>
  1335.         <hfp:hasProperty name="numeric" value="true"/>
  1336.       </xs:appinfo>
  1337.       <xs:documentation
  1338.         source="http://www.w3.org/TR/xmlschema-2/#decimal"/>
  1339.     </xs:annotation>
  1340.     <xs:restriction base="xs:anySimpleType">
  1341.       <xs:whiteSpace value="collapse"  fixed="true"
  1342.         id="decimal.whiteSpace"/>
  1343.     </xs:restriction>
  1344.    </xs:simpleType>
  1345.  
  1346.    <xs:simpleType name="duration" id="duration">
  1347.     <xs:annotation>
  1348.       <xs:appinfo>
  1349.         <hfp:hasFacet name="pattern"/>
  1350.         <hfp:hasFacet name="enumeration"/>
  1351.         <hfp:hasFacet name="whiteSpace"/>
  1352.         <hfp:hasFacet name="maxInclusive"/>
  1353.         <hfp:hasFacet name="maxExclusive"/>
  1354.         <hfp:hasFacet name="minInclusive"/>
  1355.         <hfp:hasFacet name="minExclusive"/>
  1356.         <hfp:hasProperty name="ordered" value="partial"/>
  1357.         <hfp:hasProperty name="bounded" value="false"/>
  1358.         <hfp:hasProperty name="cardinality"
  1359.                 value="countably infinite"/>
  1360.         <hfp:hasProperty name="numeric" value="false"/>
  1361.       </xs:appinfo>
  1362.       <xs:documentation
  1363.         source="http://www.w3.org/TR/xmlschema-2/#duration"/>
  1364.     </xs:annotation>
  1365.     <xs:restriction base="xs:anySimpleType">
  1366.       <xs:whiteSpace value="collapse"  fixed="true"
  1367.         id="duration.whiteSpace"/>
  1368.     </xs:restriction>
  1369.    </xs:simpleType>
  1370.  
  1371.  <xs:simpleType name="dateTime" id="dateTime">
  1372.     <xs:annotation>
  1373.     <xs:appinfo>
  1374.         <hfp:hasFacet name="pattern"/>
  1375.         <hfp:hasFacet name="enumeration"/>
  1376.         <hfp:hasFacet name="whiteSpace"/>
  1377.         <hfp:hasFacet name="maxInclusive"/>
  1378.         <hfp:hasFacet name="maxExclusive"/>
  1379.         <hfp:hasFacet name="minInclusive"/>
  1380.         <hfp:hasFacet name="minExclusive"/>
  1381.         <hfp:hasProperty name="ordered" value="partial"/>
  1382.         <hfp:hasProperty name="bounded" value="false"/>
  1383.         <hfp:hasProperty name="cardinality"
  1384.                 value="countably infinite"/>
  1385.         <hfp:hasProperty name="numeric" value="false"/>
  1386.       </xs:appinfo>
  1387.       <xs:documentation
  1388.         source="http://www.w3.org/TR/xmlschema-2/#dateTime"/>
  1389.     </xs:annotation>
  1390.     <xs:restriction base="xs:anySimpleType">
  1391.       <xs:whiteSpace value="collapse"  fixed="true"
  1392.         id="dateTime.whiteSpace"/>
  1393.     </xs:restriction>
  1394.   </xs:simpleType>
  1395.  
  1396.   <xs:simpleType name="time" id="time">
  1397.     <xs:annotation>
  1398.     <xs:appinfo>
  1399.         <hfp:hasFacet name="pattern"/>
  1400.         <hfp:hasFacet name="enumeration"/>
  1401.         <hfp:hasFacet name="whiteSpace"/>
  1402.         <hfp:hasFacet name="maxInclusive"/>
  1403.         <hfp:hasFacet name="maxExclusive"/>
  1404.         <hfp:hasFacet name="minInclusive"/>
  1405.         <hfp:hasFacet name="minExclusive"/>
  1406.         <hfp:hasProperty name="ordered" value="partial"/>
  1407.         <hfp:hasProperty name="bounded" value="false"/>
  1408.         <hfp:hasProperty name="cardinality"
  1409.                 value="countably infinite"/>
  1410.         <hfp:hasProperty name="numeric" value="false"/>
  1411.       </xs:appinfo>
  1412.       <xs:documentation
  1413.         source="http://www.w3.org/TR/xmlschema-2/#time"/>
  1414.     </xs:annotation>
  1415.     <xs:restriction base="xs:anySimpleType">
  1416.       <xs:whiteSpace value="collapse"  fixed="true"
  1417.         id="time.whiteSpace"/>
  1418.     </xs:restriction>
  1419.   </xs:simpleType>
  1420.  
  1421.   <xs:simpleType name="date" id="date">
  1422.    <xs:annotation>
  1423.     <xs:appinfo>
  1424.         <hfp:hasFacet name="pattern"/>
  1425.         <hfp:hasFacet name="enumeration"/>
  1426.         <hfp:hasFacet name="whiteSpace"/>
  1427.         <hfp:hasFacet name="maxInclusive"/>
  1428.         <hfp:hasFacet name="maxExclusive"/>
  1429.         <hfp:hasFacet name="minInclusive"/>
  1430.         <hfp:hasFacet name="minExclusive"/>
  1431.         <hfp:hasProperty name="ordered" value="partial"/>
  1432.         <hfp:hasProperty name="bounded" value="false"/>
  1433.         <hfp:hasProperty name="cardinality"
  1434.                 value="countably infinite"/>
  1435.         <hfp:hasProperty name="numeric" value="false"/>
  1436.       </xs:appinfo>
  1437.       <xs:documentation
  1438.         source="http://www.w3.org/TR/xmlschema-2/#date"/>
  1439.     </xs:annotation>
  1440.     <xs:restriction base="xs:anySimpleType">
  1441.       <xs:whiteSpace value="collapse"  fixed="true"
  1442.         id="date.whiteSpace"/>
  1443.     </xs:restriction>
  1444.   </xs:simpleType>
  1445.  
  1446.   <xs:simpleType name="gYearMonth" id="gYearMonth">
  1447.    <xs:annotation>
  1448.     <xs:appinfo>
  1449.         <hfp:hasFacet name="pattern"/>
  1450.         <hfp:hasFacet name="enumeration"/>
  1451.         <hfp:hasFacet name="whiteSpace"/>
  1452.         <hfp:hasFacet name="maxInclusive"/>
  1453.         <hfp:hasFacet name="maxExclusive"/>
  1454.         <hfp:hasFacet name="minInclusive"/>
  1455.         <hfp:hasFacet name="minExclusive"/>
  1456.         <hfp:hasProperty name="ordered" value="partial"/>
  1457.         <hfp:hasProperty name="bounded" value="false"/>
  1458.         <hfp:hasProperty name="cardinality"
  1459.                 value="countably infinite"/>
  1460.         <hfp:hasProperty name="numeric" value="false"/>
  1461.       </xs:appinfo>
  1462.       <xs:documentation
  1463.         source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/>
  1464.     </xs:annotation>
  1465.     <xs:restriction base="xs:anySimpleType">
  1466.       <xs:whiteSpace value="collapse"  fixed="true"
  1467.         id="gYearMonth.whiteSpace"/>
  1468.     </xs:restriction>
  1469.   </xs:simpleType>
  1470.  
  1471.   <xs:simpleType name="gYear" id="gYear">
  1472.     <xs:annotation>
  1473.     <xs:appinfo>
  1474.         <hfp:hasFacet name="pattern"/>
  1475.         <hfp:hasFacet name="enumeration"/>
  1476.         <hfp:hasFacet name="whiteSpace"/>
  1477.         <hfp:hasFacet name="maxInclusive"/>
  1478.         <hfp:hasFacet name="maxExclusive"/>
  1479.         <hfp:hasFacet name="minInclusive"/>
  1480.         <hfp:hasFacet name="minExclusive"/>
  1481.         <hfp:hasProperty name="ordered" value="partial"/>
  1482.         <hfp:hasProperty name="bounded" value="false"/>
  1483.         <hfp:hasProperty name="cardinality"
  1484.                 value="countably infinite"/>
  1485.         <hfp:hasProperty name="numeric" value="false"/>
  1486.       </xs:appinfo>
  1487.       <xs:documentation
  1488.         source="http://www.w3.org/TR/xmlschema-2/#gYear"/>
  1489.     </xs:annotation>
  1490.     <xs:restriction base="xs:anySimpleType">
  1491.       <xs:whiteSpace value="collapse"  fixed="true"
  1492.         id="gYear.whiteSpace"/>
  1493.     </xs:restriction>
  1494.   </xs:simpleType>
  1495.  
  1496.  <xs:simpleType name="gMonthDay" id="gMonthDay">
  1497.     <xs:annotation>
  1498.       <xs:appinfo>
  1499.         <hfp:hasFacet name="pattern"/>
  1500.         <hfp:hasFacet name="enumeration"/>
  1501.         <hfp:hasFacet name="whiteSpace"/>
  1502.         <hfp:hasFacet name="maxInclusive"/>
  1503.         <hfp:hasFacet name="maxExclusive"/>
  1504.         <hfp:hasFacet name="minInclusive"/>
  1505.         <hfp:hasFacet name="minExclusive"/>
  1506.         <hfp:hasProperty name="ordered" value="partial"/>
  1507.         <hfp:hasProperty name="bounded" value="false"/>
  1508.         <hfp:hasProperty name="cardinality"
  1509.                 value="countably infinite"/>
  1510.         <hfp:hasProperty name="numeric" value="false"/>
  1511.       </xs:appinfo>
  1512.        <xs:documentation
  1513.         source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/>
  1514.     </xs:annotation>
  1515.     <xs:restriction base="xs:anySimpleType">
  1516.          <xs:whiteSpace value="collapse" fixed="true"
  1517.                 id="gMonthDay.whiteSpace"/>
  1518.     </xs:restriction>
  1519.   </xs:simpleType>
  1520.  
  1521.   <xs:simpleType name="gDay" id="gDay">
  1522.     <xs:annotation>
  1523.   <xs:appinfo>
  1524.         <hfp:hasFacet name="pattern"/>
  1525.         <hfp:hasFacet name="enumeration"/>
  1526.         <hfp:hasFacet name="whiteSpace"/>
  1527.         <hfp:hasFacet name="maxInclusive"/>
  1528.         <hfp:hasFacet name="maxExclusive"/>
  1529.         <hfp:hasFacet name="minInclusive"/>
  1530.         <hfp:hasFacet name="minExclusive"/>
  1531.         <hfp:hasProperty name="ordered" value="partial"/>
  1532.         <hfp:hasProperty name="bounded" value="false"/>
  1533.         <hfp:hasProperty name="cardinality"
  1534.                 value="countably infinite"/>
  1535.         <hfp:hasProperty name="numeric" value="false"/>
  1536.       </xs:appinfo>
  1537.       <xs:documentation
  1538.         source="http://www.w3.org/TR/xmlschema-2/#gDay"/>
  1539.     </xs:annotation>
  1540.     <xs:restriction base="xs:anySimpleType">
  1541.          <xs:whiteSpace value="collapse"  fixed="true"
  1542.                 id="gDay.whiteSpace"/>
  1543.     </xs:restriction>
  1544.   </xs:simpleType>
  1545.  
  1546.  <xs:simpleType name="gMonth" id="gMonth">
  1547.     <xs:annotation>
  1548.   <xs:appinfo>
  1549.         <hfp:hasFacet name="pattern"/>
  1550.         <hfp:hasFacet name="enumeration"/>
  1551.         <hfp:hasFacet name="whiteSpace"/>
  1552.         <hfp:hasFacet name="maxInclusive"/>
  1553.         <hfp:hasFacet name="maxExclusive"/>
  1554.         <hfp:hasFacet name="minInclusive"/>
  1555.         <hfp:hasFacet name="minExclusive"/>
  1556.         <hfp:hasProperty name="ordered" value="partial"/>
  1557.         <hfp:hasProperty name="bounded" value="false"/>
  1558.         <hfp:hasProperty name="cardinality"
  1559.                 value="countably infinite"/>
  1560.         <hfp:hasProperty name="numeric" value="false"/>
  1561.       </xs:appinfo>
  1562.       <xs:documentation
  1563.         source="http://www.w3.org/TR/xmlschema-2/#gMonth"/>
  1564.     </xs:annotation>
  1565.     <xs:restriction base="xs:anySimpleType">
  1566.          <xs:whiteSpace value="collapse"  fixed="true"
  1567.                 id="gMonth.whiteSpace"/>
  1568.     </xs:restriction>
  1569.   </xs:simpleType>
  1570.  
  1571.    <xs:simpleType name="hexBinary" id="hexBinary">
  1572.     <xs:annotation>
  1573.       <xs:appinfo>
  1574.         <hfp:hasFacet name="length"/>
  1575.         <hfp:hasFacet name="minLength"/>
  1576.         <hfp:hasFacet name="maxLength"/>
  1577.         <hfp:hasFacet name="pattern"/>
  1578.         <hfp:hasFacet name="enumeration"/>
  1579.         <hfp:hasFacet name="whiteSpace"/>
  1580.         <hfp:hasProperty name="ordered" value="false"/>
  1581.         <hfp:hasProperty name="bounded" value="false"/>
  1582.         <hfp:hasProperty name="cardinality"
  1583.                 value="countably infinite"/>
  1584.         <hfp:hasProperty name="numeric" value="false"/>
  1585.       </xs:appinfo>
  1586.       <xs:documentation
  1587.         source="http://www.w3.org/TR/xmlschema-2/#binary"/>
  1588.     </xs:annotation>
  1589.     <xs:restriction base="xs:anySimpleType">
  1590.       <xs:whiteSpace value="collapse" fixed="true"
  1591.         id="hexBinary.whiteSpace"/>
  1592.     </xs:restriction>
  1593.    </xs:simpleType>
  1594.  
  1595.  <xs:simpleType name="base64Binary" id="base64Binary">
  1596.     <xs:annotation>
  1597.       <xs:appinfo>
  1598.         <hfp:hasFacet name="length"/>
  1599.         <hfp:hasFacet name="minLength"/>
  1600.         <hfp:hasFacet name="maxLength"/>
  1601.         <hfp:hasFacet name="pattern"/>
  1602.         <hfp:hasFacet name="enumeration"/>
  1603.         <hfp:hasFacet name="whiteSpace"/>
  1604.         <hfp:hasProperty name="ordered" value="false"/>
  1605.         <hfp:hasProperty name="bounded" value="false"/>
  1606.         <hfp:hasProperty name="cardinality"
  1607.                 value="countably infinite"/>
  1608.         <hfp:hasProperty name="numeric" value="false"/>
  1609.       </xs:appinfo>
  1610.       <xs:documentation
  1611.                 source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>
  1612.     </xs:annotation>
  1613.     <xs:restriction base="xs:anySimpleType">
  1614.       <xs:whiteSpace value="collapse" fixed="true"
  1615.         id="base64Binary.whiteSpace"/>
  1616.     </xs:restriction>
  1617.    </xs:simpleType>
  1618.  
  1619.    <xs:simpleType name="anyURI" id="anyURI">
  1620.     <xs:annotation>
  1621.       <xs:appinfo>
  1622.         <hfp:hasFacet name="length"/>
  1623.         <hfp:hasFacet name="minLength"/>
  1624.         <hfp:hasFacet name="maxLength"/>
  1625.         <hfp:hasFacet name="pattern"/>
  1626.         <hfp:hasFacet name="enumeration"/>
  1627.         <hfp:hasFacet name="whiteSpace"/>
  1628.         <hfp:hasProperty name="ordered" value="false"/>
  1629.         <hfp:hasProperty name="bounded" value="false"/>
  1630.         <hfp:hasProperty name="cardinality"
  1631.                 value="countably infinite"/>
  1632.         <hfp:hasProperty name="numeric" value="false"/>
  1633.       </xs:appinfo>
  1634.       <xs:documentation
  1635.         source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>
  1636.     </xs:annotation>
  1637.     <xs:restriction base="xs:anySimpleType">
  1638.       <xs:whiteSpace value="collapse"  fixed="true"
  1639.         id="anyURI.whiteSpace"/>
  1640.     </xs:restriction>
  1641.    </xs:simpleType>
  1642.  
  1643.   <xs:simpleType name="QName" id="QName">
  1644.     <xs:annotation>
  1645.         <xs:appinfo>
  1646.         <hfp:hasFacet name="length"/>
  1647.         <hfp:hasFacet name="minLength"/>
  1648.         <hfp:hasFacet name="maxLength"/>
  1649.         <hfp:hasFacet name="pattern"/>
  1650.         <hfp:hasFacet name="enumeration"/>
  1651.         <hfp:hasFacet name="whiteSpace"/>
  1652.         <hfp:hasProperty name="ordered" value="false"/>
  1653.         <hfp:hasProperty name="bounded" value="false"/>
  1654.         <hfp:hasProperty name="cardinality"
  1655.                 value="countably infinite"/>
  1656.         <hfp:hasProperty name="numeric" value="false"/>
  1657.       </xs:appinfo>
  1658.       <xs:documentation
  1659.         source="http://www.w3.org/TR/xmlschema-2/#QName"/>
  1660.     </xs:annotation>
  1661.     <xs:restriction base="xs:anySimpleType">
  1662.       <xs:whiteSpace value="collapse"  fixed="true"
  1663.         id="QName.whiteSpace"/>
  1664.     </xs:restriction>
  1665.   </xs:simpleType>
  1666.  
  1667.    <xs:simpleType name="NOTATION" id="NOTATION">
  1668.     <xs:annotation>
  1669.         <xs:appinfo>
  1670.         <hfp:hasFacet name="length"/>
  1671.         <hfp:hasFacet name="minLength"/>
  1672.         <hfp:hasFacet name="maxLength"/>
  1673.         <hfp:hasFacet name="pattern"/>
  1674.         <hfp:hasFacet name="enumeration"/>
  1675.         <hfp:hasFacet name="whiteSpace"/>
  1676.         <hfp:hasProperty name="ordered" value="false"/>
  1677.         <hfp:hasProperty name="bounded" value="false"/>
  1678.         <hfp:hasProperty name="cardinality"
  1679.                 value="countably infinite"/>
  1680.         <hfp:hasProperty name="numeric" value="false"/>
  1681.       </xs:appinfo>
  1682.       <xs:documentation
  1683.         source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>
  1684.       <xs:documentation>
  1685.         NOTATION cannot be used directly in a schema; rather a type
  1686.         must be derived from it by specifying at least one enumeration
  1687.         facet whose value is the name of a NOTATION declared in the
  1688.         schema.
  1689.       </xs:documentation>
  1690.     </xs:annotation>
  1691.     <xs:restriction base="xs:anySimpleType">
  1692.       <xs:whiteSpace value="collapse"  fixed="true"
  1693.         id="NOTATION.whiteSpace"/>
  1694.     </xs:restriction>
  1695.   </xs:simpleType>
  1696.  
  1697.   <xs:annotation>
  1698.     <xs:documentation>
  1699.       Now the derived primitive types
  1700.     </xs:documentation>
  1701.   </xs:annotation>
  1702.  
  1703.   <xs:simpleType name="normalizedString" id="normalizedString">
  1704.     <xs:annotation>
  1705.       <xs:documentation
  1706.         source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
  1707.     </xs:annotation>
  1708.     <xs:restriction base="xs:string">
  1709.       <xs:whiteSpace value="replace"
  1710.         id="normalizedString.whiteSpace"/>
  1711.     </xs:restriction>
  1712.   </xs:simpleType>
  1713.   
  1714.   <xs:simpleType name="token" id="token">
  1715.     <xs:annotation>
  1716.       <xs:documentation
  1717.         source="http://www.w3.org/TR/xmlschema-2/#token"/>
  1718.     </xs:annotation>
  1719.     <xs:restriction base="xs:normalizedString">
  1720.       <xs:whiteSpace value="collapse" id="token.whiteSpace"/>
  1721.     </xs:restriction>
  1722.   </xs:simpleType>
  1723.   
  1724.   <xs:simpleType name="language" id="language">
  1725.     <xs:annotation>
  1726.       <xs:documentation
  1727.         source="http://www.w3.org/TR/xmlschema-2/#language"/>
  1728.     </xs:annotation>
  1729.     <xs:restriction base="xs:token">
  1730.       <xs:pattern
  1731.         value="([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*"
  1732.                 id="language.pattern">
  1733.         <xs:annotation>
  1734.           <xs:documentation
  1735.                 source="http://www.w3.org/TR/REC-xml#NT-LanguageID">
  1736.             pattern specifies the content of section 2.12 of XML 1.0e2
  1737.             and RFC 1766
  1738.           </xs:documentation>
  1739.         </xs:annotation>
  1740.       </xs:pattern>
  1741.     </xs:restriction>
  1742.   </xs:simpleType>
  1743.  
  1744.   <xs:simpleType name="IDREFS" id="IDREFS">
  1745.     <xs:annotation>
  1746.       <xs:appinfo>
  1747.         <hfp:hasFacet name="length"/>
  1748.         <hfp:hasFacet name="minLength"/>
  1749.         <hfp:hasFacet name="maxLength"/>
  1750.         <hfp:hasFacet name="enumeration"/>
  1751.         <hfp:hasFacet name="whiteSpace"/>
  1752.         <hfp:hasProperty name="ordered" value="false"/>
  1753.         <hfp:hasProperty name="bounded" value="false"/>
  1754.         <hfp:hasProperty name="cardinality"
  1755.                 value="countably infinite"/>
  1756.         <hfp:hasProperty name="numeric" value="false"/>
  1757.       </xs:appinfo>
  1758.       <xs:documentation
  1759.         source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>
  1760.     </xs:annotation>
  1761.     <xs:restriction>
  1762.       <xs:simpleType>
  1763.         <xs:list itemType="xs:IDREF"/>    
  1764.       </xs:simpleType>
  1765.         <xs:minLength value="1" id="IDREFS.minLength"/>
  1766.     </xs:restriction>
  1767.   </xs:simpleType>
  1768.  
  1769.   <xs:simpleType name="ENTITIES" id="ENTITIES">
  1770.     <xs:annotation>
  1771.       <xs:appinfo>
  1772.         <hfp:hasFacet name="length"/>
  1773.         <hfp:hasFacet name="minLength"/>
  1774.         <hfp:hasFacet name="maxLength"/>
  1775.         <hfp:hasFacet name="enumeration"/>
  1776.         <hfp:hasFacet name="whiteSpace"/>
  1777.         <hfp:hasProperty name="ordered" value="false"/>
  1778.         <hfp:hasProperty name="bounded" value="false"/>
  1779.         <hfp:hasProperty name="cardinality"
  1780.                 value="countably infinite"/>
  1781.         <hfp:hasProperty name="numeric" value="false"/>
  1782.       </xs:appinfo>
  1783.       <xs:documentation
  1784.         source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>
  1785.     </xs:annotation>
  1786.     <xs:restriction>
  1787.       <xs:simpleType>
  1788.         <xs:list itemType="xs:ENTITY"/>
  1789.       </xs:simpleType>
  1790.         <xs:minLength value="1" id="ENTITIES.minLength"/>
  1791.     </xs:restriction>
  1792.   </xs:simpleType>
  1793.  
  1794.   <xs:simpleType name="NMTOKEN" id="NMTOKEN">
  1795.     <xs:annotation>
  1796.       <xs:documentation
  1797.         source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>
  1798.     </xs:annotation>
  1799.     <xs:restriction base="xs:token">
  1800.       <xs:pattern value="\c+" id="NMTOKEN.pattern">
  1801.         <xs:annotation>
  1802.           <xs:documentation
  1803.                 source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
  1804.             pattern matches production 7 from the XML spec
  1805.           </xs:documentation>
  1806.         </xs:annotation>
  1807.       </xs:pattern>
  1808.     </xs:restriction>
  1809.   </xs:simpleType>
  1810.  
  1811.   <xs:simpleType name="NMTOKENS" id="NMTOKENS">
  1812.     <xs:annotation>
  1813.       <xs:appinfo>
  1814.         <hfp:hasFacet name="length"/>
  1815.         <hfp:hasFacet name="minLength"/>
  1816.         <hfp:hasFacet name="maxLength"/>
  1817.         <hfp:hasFacet name="enumeration"/>
  1818.         <hfp:hasFacet name="whiteSpace"/>
  1819.         <hfp:hasProperty name="ordered" value="false"/>
  1820.         <hfp:hasProperty name="bounded" value="false"/>
  1821.         <hfp:hasProperty name="cardinality"
  1822.                 value="countably infinite"/>
  1823.         <hfp:hasProperty name="numeric" value="false"/>
  1824.       </xs:appinfo>
  1825.       <xs:documentation
  1826.         source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>
  1827.     </xs:annotation>
  1828.     <xs:restriction>
  1829.       <xs:simpleType>
  1830.         <xs:list itemType="xs:NMTOKEN"/>
  1831.       </xs:simpleType>
  1832.         <xs:minLength value="1" id="NMTOKENS.minLength"/>
  1833.     </xs:restriction>
  1834.   </xs:simpleType>
  1835.  
  1836.   <xs:simpleType name="Name" id="Name">
  1837.     <xs:annotation>
  1838.       <xs:documentation
  1839.         source="http://www.w3.org/TR/xmlschema-2/#Name"/>
  1840.     </xs:annotation>
  1841.     <xs:restriction base="xs:token">
  1842.       <xs:pattern value="\i\c*" id="Name.pattern">
  1843.         <xs:annotation>
  1844.           <xs:documentation
  1845.                         source="http://www.w3.org/TR/REC-xml#NT-Name">
  1846.             pattern matches production 5 from the XML spec
  1847.           </xs:documentation>
  1848.         </xs:annotation>
  1849.       </xs:pattern>
  1850.     </xs:restriction>
  1851.   </xs:simpleType>
  1852.  
  1853.   <xs:simpleType name="NCName" id="NCName">
  1854.     <xs:annotation>
  1855.       <xs:documentation
  1856.         source="http://www.w3.org/TR/xmlschema-2/#NCName"/>
  1857.     </xs:annotation>
  1858.     <xs:restriction base="xs:Name">
  1859.       <xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern">
  1860.         <xs:annotation>
  1861.           <xs:documentation
  1862.                 source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">
  1863.             pattern matches production 4 from the Namespaces in XML spec
  1864.           </xs:documentation>
  1865.         </xs:annotation>
  1866.       </xs:pattern>
  1867.     </xs:restriction>
  1868.   </xs:simpleType>
  1869.  
  1870.    <xs:simpleType name="ID" id="ID">
  1871.     <xs:annotation>
  1872.       <xs:documentation
  1873.         source="http://www.w3.org/TR/xmlschema-2/#ID"/>
  1874.     </xs:annotation>
  1875.     <xs:restriction base="xs:NCName"/>
  1876.    </xs:simpleType>
  1877.  
  1878.    <xs:simpleType name="IDREF" id="IDREF">
  1879.     <xs:annotation>
  1880.       <xs:documentation
  1881.         source="http://www.w3.org/TR/xmlschema-2/#IDREF"/>
  1882.     </xs:annotation>
  1883.     <xs:restriction base="xs:NCName"/>
  1884.    </xs:simpleType>
  1885.  
  1886.    <xs:simpleType name="ENTITY" id="ENTITY">
  1887.     <xs:annotation>
  1888.       <xs:documentation
  1889.         source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/>
  1890.     </xs:annotation>
  1891.     <xs:restriction base="xs:NCName"/>
  1892.    </xs:simpleType>
  1893.  
  1894.   <xs:simpleType name="integer" id="integer">
  1895.     <xs:annotation>
  1896.       <xs:documentation
  1897.         source="http://www.w3.org/TR/xmlschema-2/#integer"/>
  1898.     </xs:annotation>
  1899.     <xs:restriction base="xs:decimal">
  1900.       <xs:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/>
  1901.     </xs:restriction>
  1902.   </xs:simpleType>
  1903.  
  1904.   <xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger">
  1905.     <xs:annotation>
  1906.       <xs:documentation
  1907.         source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/>
  1908.     </xs:annotation>
  1909.     <xs:restriction base="xs:integer">
  1910.       <xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/>
  1911.     </xs:restriction>
  1912.   </xs:simpleType>
  1913.  
  1914.   <xs:simpleType name="negativeInteger" id="negativeInteger">
  1915.     <xs:annotation>
  1916.       <xs:documentation
  1917.         source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/>
  1918.     </xs:annotation>
  1919.     <xs:restriction base="xs:nonPositiveInteger">
  1920.       <xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/>
  1921.     </xs:restriction>
  1922.   </xs:simpleType>
  1923.  
  1924.   <xs:simpleType name="long" id="long">
  1925.     <xs:annotation>
  1926.       <xs:appinfo>
  1927.         <hfp:hasProperty name="bounded" value="true"/>
  1928.         <hfp:hasProperty name="cardinality" value="finite"/>
  1929.       </xs:appinfo>
  1930.       <xs:documentation
  1931.         source="http://www.w3.org/TR/xmlschema-2/#long"/>
  1932.     </xs:annotation>
  1933.     <xs:restriction base="xs:integer">
  1934.       <xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/>
  1935.       <xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/>
  1936.     </xs:restriction>
  1937.   </xs:simpleType>
  1938.  
  1939.   <xs:simpleType name="int" id="int">
  1940.     <xs:annotation>
  1941.       <xs:documentation
  1942.         source="http://www.w3.org/TR/xmlschema-2/#int"/>
  1943.     </xs:annotation>
  1944.     <xs:restriction base="xs:long">
  1945.       <xs:minInclusive value="-2147483648" id="int.minInclusive"/>
  1946.       <xs:maxInclusive value="2147483647" id="int.maxInclusive"/>
  1947.     </xs:restriction>
  1948.   </xs:simpleType>
  1949.  
  1950.   <xs:simpleType name="short" id="short">
  1951.     <xs:annotation>
  1952.       <xs:documentation
  1953.         source="http://www.w3.org/TR/xmlschema-2/#short"/>
  1954.     </xs:annotation>
  1955.     <xs:restriction base="xs:int">
  1956.       <xs:minInclusive value="-32768" id="short.minInclusive"/>
  1957.       <xs:maxInclusive value="32767" id="short.maxInclusive"/>
  1958.     </xs:restriction>
  1959.   </xs:simpleType>
  1960.  
  1961.   <xs:simpleType name="byte" id="byte">
  1962.     <xs:annotation>
  1963.       <xs:documentation
  1964.         source="http://www.w3.org/TR/xmlschema-2/#byte"/>
  1965.     </xs:annotation>
  1966.     <xs:restriction base="xs:short">
  1967.       <xs:minInclusive value="-128" id="byte.minInclusive"/>
  1968.       <xs:maxInclusive value="127" id="byte.maxInclusive"/>
  1969.     </xs:restriction>
  1970.   </xs:simpleType>
  1971.  
  1972.   <xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger">
  1973.     <xs:annotation>
  1974.       <xs:documentation
  1975.         source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/>
  1976.     </xs:annotation>
  1977.     <xs:restriction base="xs:integer">
  1978.       <xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/>
  1979.     </xs:restriction>
  1980.   </xs:simpleType>
  1981.  
  1982.   <xs:simpleType name="unsignedLong" id="unsignedLong">
  1983.     <xs:annotation>
  1984.       <xs:appinfo>
  1985.         <hfp:hasProperty name="bounded" value="true"/>
  1986.         <hfp:hasProperty name="cardinality" value="finite"/>
  1987.       </xs:appinfo>
  1988.       <xs:documentation
  1989.         source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/>
  1990.     </xs:annotation>
  1991.     <xs:restriction base="xs:nonNegativeInteger">
  1992.       <xs:maxInclusive value="18446744073709551615"
  1993.         id="unsignedLong.maxInclusive"/>
  1994.     </xs:restriction>
  1995.   </xs:simpleType>
  1996.  
  1997.   <xs:simpleType name="unsignedInt" id="unsignedInt">
  1998.     <xs:annotation>
  1999.       <xs:documentation
  2000.         source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/>
  2001.     </xs:annotation>
  2002.     <xs:restriction base="xs:unsignedLong">
  2003.       <xs:maxInclusive value="4294967295"
  2004.         id="unsignedInt.maxInclusive"/>
  2005.     </xs:restriction>
  2006.   </xs:simpleType>
  2007.  
  2008.   <xs:simpleType name="unsignedShort" id="unsignedShort">
  2009.     <xs:annotation>
  2010.       <xs:documentation
  2011.         source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/>
  2012.     </xs:annotation>
  2013.     <xs:restriction base="xs:unsignedInt">
  2014.       <xs:maxInclusive value="65535"
  2015.         id="unsignedShort.maxInclusive"/>
  2016.     </xs:restriction>
  2017.   </xs:simpleType>
  2018.  
  2019.   <xs:simpleType name="unsignedByte" id="unsignedBtype">
  2020.     <xs:annotation>
  2021.       <xs:documentation
  2022.         source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/>
  2023.     </xs:annotation>
  2024.     <xs:restriction base="xs:unsignedShort">
  2025.       <xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/>
  2026.     </xs:restriction>
  2027.   </xs:simpleType>
  2028.  
  2029.   <xs:simpleType name="positiveInteger" id="positiveInteger">
  2030.     <xs:annotation>
  2031.       <xs:documentation
  2032.         source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/>
  2033.     </xs:annotation>
  2034.     <xs:restriction base="xs:nonNegativeInteger">
  2035.       <xs:minInclusive value="1" id="positiveInteger.minInclusive"/>
  2036.     </xs:restriction>
  2037.   </xs:simpleType>
  2038.  
  2039.  <xs:simpleType name="derivationControl">
  2040.   <xs:annotation>
  2041.    <xs:documentation>
  2042.    A utility type, not for public use</xs:documentation>
  2043.   </xs:annotation>
  2044.   <xs:restriction base="xs:NMTOKEN">
  2045.    <xs:enumeration value="substitution"/>
  2046.    <xs:enumeration value="extension"/>
  2047.    <xs:enumeration value="restriction"/>
  2048.    <xs:enumeration value="list"/>
  2049.    <xs:enumeration value="union"/>
  2050.   </xs:restriction>
  2051.  </xs:simpleType>
  2052.  
  2053.  <xs:group name="simpleDerivation">
  2054.   <xs:choice>
  2055.     <xs:element ref="xs:restriction"/>
  2056.     <xs:element ref="xs:list"/>
  2057.     <xs:element ref="xs:union"/>
  2058.   </xs:choice>
  2059.  </xs:group>
  2060.  
  2061.  <xs:simpleType name="simpleDerivationSet">
  2062.   <xs:annotation>
  2063.    <xs:documentation>
  2064.    #all or (possibly empty) subset of {restriction, union, list}
  2065.    </xs:documentation>
  2066.    <xs:documentation>
  2067.    A utility type, not for public use</xs:documentation>
  2068.   </xs:annotation>
  2069.   <xs:union>
  2070.    <xs:simpleType>    
  2071.     <xs:restriction base="xs:token">
  2072.      <xs:enumeration value="#all"/>
  2073.     </xs:restriction>
  2074.    </xs:simpleType>
  2075.    <xs:simpleType>
  2076.     <xs:restriction base="xs:derivationControl">
  2077.      <xs:enumeration value="list"/>
  2078.      <xs:enumeration value="union"/>
  2079.      <xs:enumeration value="restriction"/>
  2080.     </xs:restriction>
  2081.    </xs:simpleType>
  2082.   </xs:union>
  2083.  </xs:simpleType>
  2084.  
  2085.   <xs:complexType name="simpleType" abstract="true">
  2086.     <xs:complexContent>
  2087.       <xs:extension base="xs:annotated">
  2088.         <xs:group ref="xs:simpleDerivation"/>
  2089.         <xs:attribute name="final" type="xs:simpleDerivationSet"/>
  2090.         <xs:attribute name="name" type="xs:NCName">
  2091.           <xs:annotation>
  2092.             <xs:documentation>
  2093.               Can be restricted to required or forbidden
  2094.             </xs:documentation>
  2095.           </xs:annotation>
  2096.         </xs:attribute>
  2097.       </xs:extension>
  2098.     </xs:complexContent>
  2099.   </xs:complexType>
  2100.  
  2101.   <xs:complexType name="topLevelSimpleType">
  2102.     <xs:complexContent>
  2103.       <xs:restriction base="xs:simpleType">
  2104.         <xs:sequence>
  2105.           <xs:element ref="xs:annotation" minOccurs="0"/>
  2106.           <xs:group ref="xs:simpleDerivation"/>
  2107.         </xs:sequence>
  2108.         <xs:attribute name="name" use="required"
  2109.              type="xs:NCName">
  2110.           <xs:annotation>
  2111.             <xs:documentation>
  2112.               Required at the top level
  2113.             </xs:documentation>
  2114.           </xs:annotation>
  2115.         </xs:attribute>   
  2116.       </xs:restriction>
  2117.     </xs:complexContent>
  2118.   </xs:complexType>
  2119.  
  2120.   <xs:complexType name="localSimpleType">
  2121.     <xs:complexContent>
  2122.       <xs:restriction base="xs:simpleType">
  2123.         <xs:sequence>
  2124.           <xs:element ref="xs:annotation" minOccurs="0"/>
  2125.           <xs:group ref="xs:simpleDerivation"/>
  2126.         </xs:sequence>
  2127.         <xs:attribute name="name" use="prohibited">
  2128.           <xs:annotation>
  2129.             <xs:documentation>
  2130.               Forbidden when nested
  2131.             </xs:documentation>
  2132.           </xs:annotation>
  2133.         </xs:attribute>   
  2134.         <xs:attribute name="final" use="prohibited"/>
  2135.       </xs:restriction>
  2136.     </xs:complexContent>
  2137.   </xs:complexType>
  2138.  
  2139.   <xs:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType">
  2140.     <xs:annotation>
  2141.       <xs:documentation
  2142.         source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/>
  2143.     </xs:annotation>
  2144.   </xs:element>
  2145.  
  2146.   <xs:group name="facets">
  2147.    <xs:annotation>
  2148.     <xs:documentation>
  2149.        We should use a substitution group for facets, but
  2150.        that's ruled out because it would allow users to
  2151.        add their own, which we're not ready for yet.
  2152.     </xs:documentation>
  2153.    </xs:annotation>
  2154.    <xs:choice>
  2155.     <xs:element ref="xs:minExclusive"/>
  2156.     <xs:element ref="xs:minInclusive"/>
  2157.     <xs:element ref="xs:maxExclusive"/>
  2158.     <xs:element ref="xs:maxInclusive"/>
  2159.     <xs:element ref="xs:totalDigits"/>
  2160.     <xs:element ref="xs:fractionDigits"/>
  2161.     <xs:element ref="xs:length"/>
  2162.     <xs:element ref="xs:minLength"/>
  2163.     <xs:element ref="xs:maxLength"/>
  2164.     <xs:element ref="xs:enumeration"/>
  2165.     <xs:element ref="xs:whiteSpace"/>
  2166.     <xs:element ref="xs:pattern"/>
  2167.    </xs:choice>
  2168.   </xs:group>
  2169.  
  2170.   <xs:group name="simpleRestrictionModel">
  2171.    <xs:sequence>
  2172.     <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>
  2173.     <xs:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/>
  2174.    </xs:sequence>
  2175.   </xs:group>
  2176.  
  2177.   <xs:element name="restriction" id="restriction">
  2178.    <xs:complexType>
  2179.     <xs:annotation>
  2180.       <xs:documentation
  2181.                 source="http://www.w3.org/TR/xmlschema-2/#element-restriction">
  2182.           base attribute and simpleType child are mutually
  2183.           exclusive, but one or other is required
  2184.         </xs:documentation>
  2185.       </xs:annotation>
  2186.       <xs:complexContent>
  2187.         <xs:extension base="xs:annotated">
  2188.          <xs:group ref="xs:simpleRestrictionModel"/>
  2189.          <xs:attribute name="base" type="xs:QName" use="optional"/>
  2190.         </xs:extension>
  2191.       </xs:complexContent>
  2192.     </xs:complexType>
  2193.   </xs:element>
  2194.  
  2195.   <xs:element name="list" id="list">
  2196.    <xs:complexType>
  2197.     <xs:annotation>
  2198.       <xs:documentation
  2199.                 source="http://www.w3.org/TR/xmlschema-2/#element-list">
  2200.           itemType attribute and simpleType child are mutually
  2201.           exclusive, but one or other is required
  2202.         </xs:documentation>
  2203.       </xs:annotation>
  2204.       <xs:complexContent>
  2205.         <xs:extension base="xs:annotated">
  2206.           <xs:sequence>
  2207.             <xs:element name="simpleType" type="xs:localSimpleType"
  2208.                 minOccurs="0"/>
  2209.           </xs:sequence>
  2210.           <xs:attribute name="itemType" type="xs:QName" use="optional"/>
  2211.         </xs:extension>
  2212.       </xs:complexContent>
  2213.     </xs:complexType>
  2214.   </xs:element>
  2215.  
  2216.   <xs:element name="union" id="union">
  2217.    <xs:complexType>
  2218.     <xs:annotation>
  2219.       <xs:documentation
  2220.                 source="http://www.w3.org/TR/xmlschema-2/#element-union">
  2221.           memberTypes attribute must be non-empty or there must be
  2222.           at least one simpleType child
  2223.         </xs:documentation>
  2224.       </xs:annotation>
  2225.       <xs:complexContent>
  2226.         <xs:extension base="xs:annotated">
  2227.           <xs:sequence>
  2228.             <xs:element name="simpleType" type="xs:localSimpleType"
  2229.                 minOccurs="0" maxOccurs="unbounded"/>
  2230.           </xs:sequence>
  2231.           <xs:attribute name="memberTypes" use="optional">
  2232.             <xs:simpleType>
  2233.               <xs:list itemType="xs:QName"/>
  2234.             </xs:simpleType>
  2235.           </xs:attribute>
  2236.         </xs:extension>
  2237.       </xs:complexContent>
  2238.     </xs:complexType>
  2239.   </xs:element>
  2240.   
  2241.   <xs:complexType name="facet">
  2242.     <xs:complexContent>
  2243.       <xs:extension base="xs:annotated">
  2244.         <xs:attribute name="value" use="required"/>
  2245.         <xs:attribute name="fixed" type="xs:boolean" use="optional"
  2246.                       default="false"/>
  2247.       </xs:extension>
  2248.     </xs:complexContent>
  2249.   </xs:complexType>
  2250.  
  2251.  <xs:complexType name="noFixedFacet">
  2252.   <xs:complexContent>
  2253.    <xs:restriction base="xs:facet">
  2254.     <xs:sequence>
  2255.      <xs:element ref="xs:annotation" minOccurs="0"/>
  2256.     </xs:sequence>
  2257.     <xs:attribute name="fixed" use="prohibited"/>
  2258.    </xs:restriction>
  2259.   </xs:complexContent>
  2260.  </xs:complexType>
  2261.  
  2262.   <xs:element name="minExclusive" id="minExclusive" type="xs:facet">
  2263.     <xs:annotation>
  2264.       <xs:documentation
  2265.         source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/>
  2266.     </xs:annotation>
  2267.   </xs:element>
  2268.   <xs:element name="minInclusive" id="minInclusive" type="xs:facet">
  2269.     <xs:annotation>
  2270.       <xs:documentation
  2271.         source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/>
  2272.     </xs:annotation>
  2273.   </xs:element>
  2274.  
  2275.   <xs:element name="maxExclusive" id="maxExclusive" type="xs:facet">
  2276.     <xs:annotation>
  2277.       <xs:documentation
  2278.         source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/>
  2279.     </xs:annotation>
  2280.   </xs:element>
  2281.   <xs:element name="maxInclusive" id="maxInclusive" type="xs:facet">
  2282.     <xs:annotation>
  2283.       <xs:documentation
  2284.         source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/>
  2285.     </xs:annotation>
  2286.   </xs:element>
  2287.  
  2288.   <xs:complexType name="numFacet">
  2289.     <xs:complexContent>
  2290.       <xs:restriction base="xs:facet">
  2291.        <xs:sequence>
  2292.          <xs:element ref="xs:annotation" minOccurs="0"/>
  2293.        </xs:sequence>
  2294.        <xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/>
  2295.       </xs:restriction>
  2296.     </xs:complexContent>
  2297.   </xs:complexType>
  2298.  
  2299.   <xs:element name="totalDigits" id="totalDigits">
  2300.     <xs:annotation>
  2301.       <xs:documentation
  2302.         source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/>
  2303.     </xs:annotation>
  2304.     <xs:complexType>
  2305.       <xs:complexContent>
  2306.         <xs:restriction base="xs:numFacet">
  2307.           <xs:sequence>
  2308.             <xs:element ref="xs:annotation" minOccurs="0"/>
  2309.           </xs:sequence>
  2310.           <xs:attribute name="value" type="xs:positiveInteger" use="required"/>
  2311.         </xs:restriction>
  2312.       </xs:complexContent>
  2313.     </xs:complexType>
  2314.   </xs:element>
  2315.   <xs:element name="fractionDigits" id="fractionDigits" type="xs:numFacet">
  2316.     <xs:annotation>
  2317.       <xs:documentation
  2318.         source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>
  2319.     </xs:annotation>
  2320.   </xs:element>
  2321.  
  2322.   <xs:element name="length" id="length" type="xs:numFacet">
  2323.     <xs:annotation>
  2324.       <xs:documentation
  2325.         source="http://www.w3.org/TR/xmlschema-2/#element-length"/>
  2326.     </xs:annotation>
  2327.   </xs:element>
  2328.   <xs:element name="minLength" id="minLength" type="xs:numFacet">
  2329.     <xs:annotation>
  2330.       <xs:documentation
  2331.         source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/>
  2332.     </xs:annotation>
  2333.   </xs:element>
  2334.   <xs:element name="maxLength" id="maxLength" type="xs:numFacet">
  2335.     <xs:annotation>
  2336.       <xs:documentation
  2337.         source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/>
  2338.     </xs:annotation>
  2339.   </xs:element>
  2340.   
  2341.   <xs:element name="enumeration" id="enumeration" type="xs:noFixedFacet">
  2342.     <xs:annotation>
  2343.       <xs:documentation
  2344.         source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/>
  2345.     </xs:annotation>
  2346.   </xs:element>
  2347.  
  2348.   <xs:element name="whiteSpace" id="whiteSpace">
  2349.     <xs:annotation>
  2350.       <xs:documentation
  2351.         source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/>
  2352.     </xs:annotation>
  2353.     <xs:complexType>
  2354.       <xs:complexContent>
  2355.         <xs:restriction base="xs:facet">
  2356.           <xs:sequence>
  2357.             <xs:element ref="xs:annotation" minOccurs="0"/>
  2358.           </xs:sequence>
  2359.           <xs:attribute name="value" use="required">
  2360.             <xs:simpleType>
  2361.               <xs:restriction base="xs:NMTOKEN">
  2362.                 <xs:enumeration value="preserve"/>
  2363.                 <xs:enumeration value="replace"/>
  2364.                 <xs:enumeration value="collapse"/>
  2365.               </xs:restriction>
  2366.             </xs:simpleType>
  2367.           </xs:attribute>
  2368.         </xs:restriction>
  2369.       </xs:complexContent>
  2370.     </xs:complexType>
  2371.   </xs:element>
  2372.  
  2373.   <xs:element name="pattern" id="pattern" type="xs:noFixedFacet">
  2374.     <xs:annotation>
  2375.       <xs:documentation
  2376.         source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/>
  2377.     </xs:annotation>
  2378.   </xs:element>
  2379.  
  2380. </xs:schema>
  2381.