<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema version="1.0" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://mapixcms.org/schemas/schema.xsd">
 <xsd:annotation>
  <xsd:documentation>
    Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp 
    Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp 
  </xsd:documentation>
 </xsd:annotation>

 <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures.html">
   The schema corresponding to this document is normative,
   with respect to the syntactic constraints it expresses in the
   XML Schema language.  The documentation (within &lt;documentation&gt; elements)
   below, is not normative, but rather highlights important aspects of
   the W3C Recommendation of which this is a part</xsd:documentation>
 </xsd:annotation>

 <xsd:annotation>
   <xsd:documentation>
   The simpleType element and all of its members are defined
      towards the end of this schema document</xsd:documentation>
 </xsd:annotation>

 <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd">
   <xsd:annotation>
     <xsd:documentation>
       Get access to the xml: attribute groups for xml:lang
       as declared on 'schema' and 'documentation' below
     </xsd:documentation>
   </xsd:annotation>
 </xsd:import>

 <xsd:complexType name="openAttrs">
   <xsd:annotation>
     <xsd:documentation>
       This type is extended by almost all schema types
       to allow attributes from other namespaces to be
       added to user schemas.
     </xsd:documentation>
   </xsd:annotation>
   <xsd:complexContent>
     <xsd:restriction base="xs:anyType">
       <xsd:anyAttribute namespace="##other" processContents="lax"/>
     </xsd:restriction>
   </xsd:complexContent>
 </xsd:complexType>

 <xsd:complexType name="annotated">
   <xsd:annotation>
     <xsd:documentation>
       This type is extended by all types which allow annotation
       other than &lt;schema&gt; itself
     </xsd:documentation>
   </xsd:annotation>
   <xsd:complexContent>
     <xsd:extension base="xs:openAttrs">
       <xsd:sequence>
         <xsd:element ref="xs:annotation" minOccurs="0"/>
       </xsd:sequence>
       <xsd:attribute name="id" type="xs:ID"/>
     </xsd:extension>
   </xsd:complexContent>
 </xsd:complexType>

 <xsd:group name="schemaTop">
  <xsd:annotation>
   <xsd:documentation>
   This group is for the
   elements which occur freely at the top level of schemas.
   All of their types are based on the "annotated" type by extension.</xsd:documentation>
  </xsd:annotation>
  <xsd:choice>
   <xsd:group ref="xs:redefinable"/>
   <xsd:element ref="xs:element"/>
   <xsd:element ref="xs:attribute"/>
   <xsd:element ref="xs:notation"/>
  </xsd:choice>
 </xsd:group>
 
 <xsd:group name="redefinable">
  <xsd:annotation>
   <xsd:documentation>
   This group is for the
   elements which can self-redefine (see &lt;redefine&gt; below).</xsd:documentation>
  </xsd:annotation>
  <xsd:choice>
   <xsd:element ref="xs:simpleType"/>
   <xsd:element ref="xs:complexType"/>
   <xsd:element ref="xs:group"/>
   <xsd:element ref="xs:attributeGroup"/>
  </xsd:choice>
 </xsd:group>

 <xsd:simpleType name="formChoice">
  <xsd:annotation>
   <xsd:documentation>
   A utility type, not for public use</xsd:documentation>
  </xsd:annotation>
  <xsd:restriction base="xs:NMTOKEN">
   <xsd:enumeration value="qualified"/>
   <xsd:enumeration value="unqualified"/>
  </xsd:restriction>
 </xsd:simpleType>

 <xsd:simpleType name="reducedDerivationControl">
  <xsd:annotation>
   <xsd:documentation>
   A utility type, not for public use</xsd:documentation>
  </xsd:annotation>
  <xsd:restriction base="xs:derivationControl">
   <xsd:enumeration value="extension"/>
   <xsd:enumeration value="restriction"/>
  </xsd:restriction>
 </xsd:simpleType>

 <xsd:simpleType name="derivationSet">
  <xsd:annotation>
   <xsd:documentation>
   A utility type, not for public use</xsd:documentation>
   <xsd:documentation>
   #all or (possibly empty) subset of {extension, restriction}</xsd:documentation>
  </xsd:annotation>
  <xsd:union>
   <xsd:simpleType>    
    <xsd:restriction base="xs:token">
     <xsd:enumeration value="#all"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType>
    <xsd:list itemType="xs:reducedDerivationControl"/>
   </xsd:simpleType>
  </xsd:union>
 </xsd:simpleType>

 <xsd:simpleType name="typeDerivationControl">
  <xsd:annotation>
   <xsd:documentation>
   A utility type, not for public use</xsd:documentation>
  </xsd:annotation>
  <xsd:restriction base="xs:derivationControl">
   <xsd:enumeration value="extension"/>
   <xsd:enumeration value="restriction"/>
   <xsd:enumeration value="list"/>
   <xsd:enumeration value="union"/>
  </xsd:restriction>
 </xsd:simpleType>

  <xsd:simpleType name="fullDerivationSet">
  <xsd:annotation>
   <xsd:documentation>
   A utility type, not for public use</xsd:documentation>
   <xsd:documentation>
   #all or (possibly empty) subset of {extension, restriction, list, union}</xsd:documentation>
  </xsd:annotation>
  <xsd:union>
   <xsd:simpleType>    
    <xsd:restriction base="xs:token">
     <xsd:enumeration value="#all"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType>
    <xsd:list itemType="xs:typeDerivationControl"/>
   </xsd:simpleType>
  </xsd:union>
 </xsd:simpleType>

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

  <xsd:key name="element">
   <xsd:selector xpath="xs:element"/>
   <xsd:field xpath="@name"/>
  </xsd:key>

  <xsd:key name="attribute">
   <xsd:selector xpath="xs:attribute"/>
   <xsd:field xpath="@name"/>
  </xsd:key>

  <xsd:key name="type">
   <xsd:selector xpath="xs:complexType|xs:simpleType"/>
   <xsd:field xpath="@name"/>
  </xsd:key>
 
  <xsd:key name="group">
   <xsd:selector xpath="xs:group"/>
   <xsd:field xpath="@name"/>
  </xsd:key>
 
  <xsd:key name="attributeGroup">
   <xsd:selector xpath="xs:attributeGroup"/>
   <xsd:field xpath="@name"/>
  </xsd:key>
 
  <xsd:key name="notation">
   <xsd:selector xpath="xs:notation"/>
   <xsd:field xpath="@name"/>
  </xsd:key>

  <xsd:key name="identityConstraint">
   <xsd:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
   <xsd:field xpath="@name"/>
  </xsd:key>

 </xsd:element>

 <xsd:simpleType name="allNNI">
  <xsd:annotation><xsd:documentation>
   for maxOccurs</xsd:documentation></xsd:annotation>
  <xsd:union memberTypes="xs:nonNegativeInteger">
   <xsd:simpleType>
    <xsd:restriction base="xs:NMTOKEN">
     <xsd:enumeration value="unbounded"/>
    </xsd:restriction>
   </xsd:simpleType>
  </xsd:union>
 </xsd:simpleType>

 <xsd:attributeGroup name="occurs">
  <xsd:annotation><xsd:documentation>
   for all particles</xsd:documentation></xsd:annotation>
  <xsd:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/>
  <xsd:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/>
 </xsd:attributeGroup>

 <xsd:attributeGroup name="defRef">
  <xsd:annotation><xsd:documentation>
   for element, group and attributeGroup,
   which both define and reference</xsd:documentation></xsd:annotation>
  <xsd:attribute name="name" type="xs:NCName"/>
  <xsd:attribute name="ref" type="xs:QName"/>
 </xsd:attributeGroup>

 <xsd:group name="typeDefParticle">
  <xsd:annotation>
    <xsd:documentation>
   'complexType' uses this</xsd:documentation></xsd:annotation>
  <xsd:choice>
   <xsd:element name="group" type="xs:groupRef"/>
   <xsd:element ref="xs:all"/>
   <xsd:element ref="xs:choice"/>
   <xsd:element ref="xs:sequence"/>
  </xsd:choice>
 </xsd:group>
 
 

 <xsd:group name="nestedParticle">
  <xsd:choice>
   <xsd:element name="element" type="xs:localElement"/>
   <xsd:element name="group" type="xs:groupRef"/>
   <xsd:element ref="xs:choice"/>
   <xsd:element ref="xs:sequence"/>
   <xsd:element ref="xs:any"/>
  </xsd:choice>
 </xsd:group>
 
 <xsd:group name="particle">
  <xsd:choice>
   <xsd:element name="element" type="xs:localElement"/>
   <xsd:element name="group" type="xs:groupRef"/>
   <xsd:element ref="xs:all"/>
   <xsd:element ref="xs:choice"/>
   <xsd:element ref="xs:sequence"/>
   <xsd:element ref="xs:any"/>
  </xsd:choice>
 </xsd:group>
 
 <xsd:complexType name="attribute">
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
    <xsd:sequence>
     <xsd:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
    </xsd:sequence>
    <xsd:attributeGroup ref="xs:defRef"/>
    <xsd:attribute name="type" type="xs:QName"/>
    <xsd:attribute name="use" use="optional" default="optional">
     <xsd:simpleType>
      <xsd:restriction base="xs:NMTOKEN">
       <xsd:enumeration value="prohibited"/>
       <xsd:enumeration value="optional"/>
       <xsd:enumeration value="required"/>
      </xsd:restriction>
     </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="default" type="xs:string"/>
    <xsd:attribute name="fixed" type="xs:string"/>
    <xsd:attribute name="form" type="xs:formChoice"/>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="topLevelAttribute">
  <xsd:complexContent>
   <xsd:restriction base="xs:attribute">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
    </xsd:sequence>
    <xsd:attribute name="ref" use="prohibited"/>
    <xsd:attribute name="form" use="prohibited"/>
    <xsd:attribute name="use" use="prohibited"/>
    <xsd:attribute name="name" use="required" type="xs:NCName"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:group name="attrDecls">
  <xsd:sequence>
   <xsd:choice minOccurs="0" maxOccurs="unbounded">
    <xsd:element name="attribute" type="xs:attribute"/>
    <xsd:element name="attributeGroup" type="xs:attributeGroupRef"/>
   </xsd:choice>
   <xsd:element ref="xs:anyAttribute" minOccurs="0"/>
  </xsd:sequence>
 </xsd:group>

 <xsd:element name="anyAttribute" type="xs:wildcard" id="anyAttribute">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/>
  </xsd:annotation>
 </xsd:element>

 <xsd:group name="complexTypeModel">
  <xsd:choice>
      <xsd:element ref="xs:simpleContent"/>
      <xsd:element ref="xs:complexContent"/>
      <xsd:sequence>
       <xsd:annotation>
        <xsd:documentation>
   This branch is short for
   &lt;complexContent&gt;
   &lt;restriction base="xs:anyType"&gt;
   ...
   &lt;/restriction&gt;
   &lt;/complexContent&gt;</xsd:documentation>
       </xsd:annotation>
       <xsd:group ref="xs:typeDefParticle" minOccurs="0"/>
       <xsd:group ref="xs:attrDecls"/>
      </xsd:sequence>
  </xsd:choice>
 </xsd:group>

 <xsd:complexType name="complexType" abstract="true">
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
    <xsd:group ref="xs:complexTypeModel"/>
    <xsd:attribute name="name" type="xs:NCName">
     <xsd:annotation>
      <xsd:documentation>
      Will be restricted to required or forbidden</xsd:documentation>
     </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="mixed" type="xs:boolean" use="optional" default="false">
     <xsd:annotation>
      <xsd:documentation>
      Not allowed if simpleContent child is chosen.
      May be overriden by setting on complexContent child.</xsd:documentation>
    </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
    <xsd:attribute name="final" type="xs:derivationSet"/>
    <xsd:attribute name="block" type="xs:derivationSet"/>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="topLevelComplexType">
  <xsd:complexContent>
   <xsd:restriction base="xs:complexType">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:group ref="xs:complexTypeModel"/>
    </xsd:sequence>
    <xsd:attribute name="name" type="xs:NCName" use="required"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="localComplexType">
  <xsd:complexContent>
   <xsd:restriction base="xs:complexType">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:group ref="xs:complexTypeModel"/>
    </xsd:sequence>
    <xsd:attribute name="name" use="prohibited"/>
    <xsd:attribute name="abstract" use="prohibited"/>
    <xsd:attribute name="final" use="prohibited"/>
    <xsd:attribute name="block" use="prohibited"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="restrictionType">
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
    <xsd:sequence>
     <xsd:choice minOccurs="0">
      <xsd:group ref="xs:typeDefParticle"/>
      <xsd:group ref="xs:simpleRestrictionModel"/>
     </xsd:choice>
     <xsd:group ref="xs:attrDecls"/>
    </xsd:sequence>
    <xsd:attribute name="base" type="xs:QName" use="required"/>
   </xsd:extension>
  </xsd:complexContent>       
 </xsd:complexType>

 <xsd:complexType name="complexRestrictionType">
  <xsd:complexContent>
   <xsd:restriction base="xs:restrictionType">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:choice minOccurs="0">
      <xsd:annotation>
       <xsd:documentation>This choice is added simply to
                   make this a valid restriction per the REC</xsd:documentation>
      </xsd:annotation>
      <xsd:group ref="xs:typeDefParticle"/>
     </xsd:choice>
     <xsd:group ref="xs:attrDecls"/>
    </xsd:sequence>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>       
 </xsd:complexType>

 <xsd:complexType name="extensionType">
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
    <xsd:sequence>
     <xsd:group ref="xs:typeDefParticle" minOccurs="0"/>
     <xsd:group ref="xs:attrDecls"/>
    </xsd:sequence>
    <xsd:attribute name="base" type="xs:QName" use="required"/>
   </xsd:extension>
  </xsd:complexContent>       
 </xsd:complexType>

 <xsd:element name="complexContent" id="complexContent">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:complexContent>
    <xsd:extension base="xs:annotated">
     <xsd:choice>
      <xsd:element name="restriction" type="xs:complexRestrictionType"/>
      <xsd:element name="extension" type="xs:extensionType"/>
     </xsd:choice>     
     <xsd:attribute name="mixed" type="xs:boolean">
      <xsd:annotation>
       <xsd:documentation>
       Overrides any setting on complexType parent.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    </xsd:extension>
   </xsd:complexContent>
  </xsd:complexType>
 </xsd:element>

 <xsd:complexType name="simpleRestrictionType">
  <xsd:complexContent>
   <xsd:restriction base="xs:restrictionType">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:choice minOccurs="0">
      <xsd:annotation>
       <xsd:documentation>This choice is added simply to
                   make this a valid restriction per the REC</xsd:documentation>
      </xsd:annotation>
      <xsd:group ref="xs:simpleRestrictionModel"/>
     </xsd:choice>
     <xsd:group ref="xs:attrDecls"/>
    </xsd:sequence>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:complexType name="simpleExtensionType">
  <xsd:complexContent>
   <xsd:restriction base="xs:extensionType">
    <xsd:sequence>
     <xsd:annotation>
      <xsd:documentation>
      No typeDefParticle group reference</xsd:documentation>
     </xsd:annotation>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:group ref="xs:attrDecls"/>
    </xsd:sequence>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:element name="simpleContent" id="simpleContent">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:complexContent>
    <xsd:extension base="xs:annotated">
     <xsd:choice>
      <xsd:element name="restriction" type="xs:simpleRestrictionType"/>
      <xsd:element name="extension" type="xs:simpleExtensionType"/>
     </xsd:choice>
    </xsd:extension>
   </xsd:complexContent>
  </xsd:complexType>
 </xsd:element>
 
 <xsd:element name="complexType" type="xs:topLevelComplexType" id="complexType">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>
  </xsd:annotation>
 </xsd:element>


  <xsd:simpleType name="blockSet">
   <xsd:annotation>
    <xsd:documentation>
    A utility type, not for public use</xsd:documentation>
    <xsd:documentation>
    #all or (possibly empty) subset of {substitution, extension,
    restriction}</xsd:documentation>
   </xsd:annotation>
   <xsd:union>
    <xsd:simpleType>    
     <xsd:restriction base="xs:token">
      <xsd:enumeration value="#all"/>
     </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType>
     <xsd:list>
      <xsd:simpleType>
       <xsd:restriction base="xs:derivationControl">
        <xsd:enumeration value="extension"/>
        <xsd:enumeration value="restriction"/>
        <xsd:enumeration value="substitution"/>
       </xsd:restriction>
      </xsd:simpleType>
     </xsd:list>
    </xsd:simpleType>
   </xsd:union>  
  </xsd:simpleType>

 <xsd:complexType name="element" abstract="true">
  <xsd:annotation>
   <xsd:documentation>
   The element element can be used either
   at the top level to define an element-type binding globally,
   or within a content model to either reference a globally-defined
   element or type or declare an element-type binding locally.
   The ref form is not allowed at the top level.</xsd:documentation>
  </xsd:annotation>

  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
    <xsd:sequence>
     <xsd:choice minOccurs="0">
      <xsd:element name="simpleType" type="xs:localSimpleType"/>
      <xsd:element name="complexType" type="xs:localComplexType"/>
     </xsd:choice>
     <xsd:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attributeGroup ref="xs:defRef"/>
    <xsd:attribute name="type" type="xs:QName"/>
    <xsd:attribute name="substitutionGroup" type="xs:QName"/>
    <xsd:attributeGroup ref="xs:occurs"/>
    <xsd:attribute name="default" type="xs:string"/>
    <xsd:attribute name="fixed" type="xs:string"/>
    <xsd:attribute name="nillable" type="xs:boolean" use="optional" default="false"/>
    <xsd:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
    <xsd:attribute name="final" type="xs:derivationSet"/>
    <xsd:attribute name="block" type="xs:blockSet"/>
    <xsd:attribute name="form" type="xs:formChoice"/>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="topLevelElement">
  <xsd:complexContent>
   <xsd:restriction base="xs:element">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:choice minOccurs="0">
      <xsd:element name="simpleType" type="xs:localSimpleType"/>
      <xsd:element name="complexType" type="xs:localComplexType"/>
     </xsd:choice>
     <xsd:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="ref" use="prohibited"/>
    <xsd:attribute name="form" use="prohibited"/>
    <xsd:attribute name="minOccurs" use="prohibited"/>
    <xsd:attribute name="maxOccurs" use="prohibited"/>
    <xsd:attribute name="name" use="required" type="xs:NCName"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="localElement">
  <xsd:complexContent>
   <xsd:restriction base="xs:element">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:choice minOccurs="0">
      <xsd:element name="simpleType" type="xs:localSimpleType"/>
      <xsd:element name="complexType" type="xs:localComplexType"/>
     </xsd:choice>
     <xsd:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="substitutionGroup" use="prohibited"/>
    <xsd:attribute name="final" use="prohibited"/>
    <xsd:attribute name="abstract" use="prohibited"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:element name="element" type="xs:topLevelElement" id="element">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>
  </xsd:annotation>
 </xsd:element>

 <xsd:complexType name="group" abstract="true">
  <xsd:annotation>
   <xsd:documentation>
   group type for explicit groups, named top-level groups and
   group references</xsd:documentation>
  </xsd:annotation>
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
    <xsd:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:attributeGroup ref="xs:defRef"/>
    <xsd:attributeGroup ref="xs:occurs"/>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="realGroup">
  <xsd:complexContent>
   <xsd:restriction base="xs:group">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:choice minOccurs="0" maxOccurs="1">
      <xsd:element ref="xs:all"/>
      <xsd:element ref="xs:choice"/>
      <xsd:element ref="xs:sequence"/>
     </xsd:choice>
    </xsd:sequence>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:complexType name="namedGroup">
  <xsd:complexContent>
   <xsd:restriction base="xs:realGroup">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:choice minOccurs="1" maxOccurs="1">
      <xsd:element name="all">
       <xsd:complexType>
        <xsd:complexContent>
         <xsd:restriction base="xs:all">
          <xsd:group ref="xs:allModel"/>
          <xsd:attribute name="minOccurs" use="prohibited"/>
          <xsd:attribute name="maxOccurs" use="prohibited"/>
          <xsd:anyAttribute namespace="##other" processContents="lax"/>
         </xsd:restriction>
        </xsd:complexContent>
       </xsd:complexType>
      </xsd:element>
      <xsd:element name="choice" type="xs:simpleExplicitGroup"/>
      <xsd:element name="sequence" type="xs:simpleExplicitGroup"/>
     </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="name" use="required" type="xs:NCName"/>
    <xsd:attribute name="ref" use="prohibited"/>
    <xsd:attribute name="minOccurs" use="prohibited"/>
    <xsd:attribute name="maxOccurs" use="prohibited"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:complexType name="groupRef">
  <xsd:complexContent>
   <xsd:restriction base="xs:realGroup">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="ref" use="required" type="xs:QName"/>
    <xsd:attribute name="name" use="prohibited"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:complexType name="explicitGroup">
  <xsd:annotation>
   <xsd:documentation>
   group type for the three kinds of group</xsd:documentation>
  </xsd:annotation>
  <xsd:complexContent>
   <xsd:restriction base="xs:group">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="name" type="xs:NCName" use="prohibited"/>
    <xsd:attribute name="ref" type="xs:QName" use="prohibited"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="simpleExplicitGroup">
  <xsd:complexContent>
   <xsd:restriction base="xs:explicitGroup">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="minOccurs" use="prohibited"/>
    <xsd:attribute name="maxOccurs" use="prohibited"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:group name="allModel">
  <xsd:sequence>
      <xsd:element ref="xs:annotation" minOccurs="0"/>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
       <xsd:annotation>
        <xsd:documentation>This choice with min/max is here to
                          avoid a pblm with the Elt:All/Choice/Seq
                          Particle derivation constraint</xsd:documentation>
       </xsd:annotation>
       <xsd:element name="element" type="xs:narrowMaxMin"/>
      </xsd:choice>
     </xsd:sequence>
 </xsd:group>
 
 
 <xsd:complexType name="narrowMaxMin">
  <xsd:annotation>
   <xsd:documentation>restricted max/min</xsd:documentation>
  </xsd:annotation>
  <xsd:complexContent>
   <xsd:restriction base="xs:localElement">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:choice minOccurs="0">
      <xsd:element name="simpleType" type="xs:localSimpleType"/>
      <xsd:element name="complexType" type="xs:localComplexType"/>
     </xsd:choice>
     <xsd:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="minOccurs" use="optional" default="1">
     <xsd:simpleType>
      <xsd:restriction base="xs:nonNegativeInteger">
       <xsd:enumeration value="0"/>
       <xsd:enumeration value="1"/>
      </xsd:restriction>
     </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="maxOccurs" use="optional" default="1">
     <xsd:simpleType>
      <xsd:restriction base="xs:allNNI">
       <xsd:enumeration value="0"/>
       <xsd:enumeration value="1"/>
      </xsd:restriction>
     </xsd:simpleType>
    </xsd:attribute>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

  <xsd:complexType name="all">
   <xsd:annotation>
    <xsd:documentation>
   Only elements allowed inside</xsd:documentation>
   </xsd:annotation>
   <xsd:complexContent>
    <xsd:restriction base="xs:explicitGroup">
     <xsd:group ref="xs:allModel"/>
     <xsd:attribute name="minOccurs" use="optional" default="1">
      <xsd:simpleType>
       <xsd:restriction base="xs:nonNegativeInteger">
        <xsd:enumeration value="0"/>
        <xsd:enumeration value="1"/>
       </xsd:restriction>
      </xsd:simpleType>
     </xsd:attribute>
     <xsd:attribute name="maxOccurs" use="optional" default="1">
      <xsd:simpleType>
       <xsd:restriction base="xs:allNNI">
        <xsd:enumeration value="1"/>
       </xsd:restriction>
      </xsd:simpleType>
     </xsd:attribute>
     <xsd:anyAttribute namespace="##other" processContents="lax"/>
    </xsd:restriction>
   </xsd:complexContent>
  </xsd:complexType>

 <xsd:element name="all" id="all" type="xs:all">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/>
  </xsd:annotation>
 </xsd:element>

 <xsd:element name="choice" type="xs:explicitGroup" id="choice">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>
  </xsd:annotation>
 </xsd:element>

 <xsd:element name="sequence" type="xs:explicitGroup" id="sequence">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>
  </xsd:annotation>
 </xsd:element>

 <xsd:element name="group" type="xs:namedGroup" id="group">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>
  </xsd:annotation>
 </xsd:element>

 <xsd:complexType name="wildcard">
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
    <xsd:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/>
    <xsd:attribute name="processContents" use="optional" default="strict">
     <xsd:simpleType>
      <xsd:restriction base="xs:NMTOKEN">
       <xsd:enumeration value="skip"/>
       <xsd:enumeration value="lax"/>
       <xsd:enumeration value="strict"/>
      </xsd:restriction>
     </xsd:simpleType>
    </xsd:attribute>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:element name="any" id="any">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:complexContent>
    <xsd:extension base="xs:wildcard">
     <xsd:attributeGroup ref="xs:occurs"/>
    </xsd:extension>
   </xsd:complexContent>
  </xsd:complexType>
 </xsd:element>

  <xsd:annotation>
   <xsd:documentation>
   simple type for the value of the 'namespace' attr of
   'any' and 'anyAttribute'</xsd:documentation>
  </xsd:annotation>
  <xsd:annotation>
   <xsd:documentation>
   Value is
              ##any      - - any non-conflicting WFXML/attribute at all

              ##other    - - any non-conflicting WFXML/attribute from
                              namespace other than targetNS

              ##local    - - any unqualified non-conflicting WFXML/attribute 

              one or     - - any non-conflicting WFXML/attribute from
              more URI        the listed namespaces
              references
              (space separated)

    ##targetNamespace or ##local may appear in the above list, to
        refer to the targetNamespace of the enclosing
        schema or an absent targetNamespace respectively</xsd:documentation>
  </xsd:annotation>

 <xsd:simpleType name="namespaceList">
  <xsd:annotation>
   <xsd:documentation>
   A utility type, not for public use</xsd:documentation>
  </xsd:annotation>
  <xsd:union>
   <xsd:simpleType>
    <xsd:restriction base="xs:token">
     <xsd:enumeration value="##any"/>
     <xsd:enumeration value="##other"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType>
    <xsd:list>
     <xsd:simpleType>
      <xsd:union memberTypes="xs:anyURI">
       <xsd:simpleType>
        <xsd:restriction base="xs:token">
         <xsd:enumeration value="##targetNamespace"/>
         <xsd:enumeration value="##local"/>
        </xsd:restriction>
       </xsd:simpleType>
      </xsd:union>
     </xsd:simpleType>
    </xsd:list>
   </xsd:simpleType>
  </xsd:union>
 </xsd:simpleType>

 <xsd:element name="attribute" type="xs:topLevelAttribute" id="attribute">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>
  </xsd:annotation>
 </xsd:element>

 <xsd:complexType name="attributeGroup" abstract="true">
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
    <xsd:group ref="xs:attrDecls"/>
    <xsd:attributeGroup ref="xs:defRef"/>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
 
 <xsd:complexType name="namedAttributeGroup">
  <xsd:complexContent>
   <xsd:restriction base="xs:attributeGroup">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
     <xsd:group ref="xs:attrDecls"/>
    </xsd:sequence>
    <xsd:attribute name="name" use="required" type="xs:NCName"/>
    <xsd:attribute name="ref" use="prohibited"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:complexType name="attributeGroupRef">
  <xsd:complexContent>
   <xsd:restriction base="xs:attributeGroup">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="ref" use="required" type="xs:QName"/>
    <xsd:attribute name="name" use="prohibited"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>
  </xsd:annotation>
 </xsd:element>

 <xsd:element name="include" id="include">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:complexContent>
    <xsd:extension base="xs:annotated">
     <xsd:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
    </xsd:extension>
   </xsd:complexContent>
  </xsd:complexType>
 </xsd:element>

 <xsd:element name="redefine" id="redefine">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:complexContent>
    <xsd:extension base="xs:openAttrs">
     <xsd:choice minOccurs="0" maxOccurs="unbounded">
      <xsd:element ref="xs:annotation"/>
      <xsd:group ref="xs:redefinable"/>
     </xsd:choice>
     <xsd:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
     <xsd:attribute name="id" type="xs:ID"/>
    </xsd:extension>
   </xsd:complexContent>
  </xsd:complexType>
 </xsd:element>

 <xsd:element name="import" id="import">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:complexContent>
    <xsd:extension base="xs:annotated">
     <xsd:attribute name="namespace" type="xs:anyURI"/>
     <xsd:attribute name="schemaLocation" type="xs:anyURI"/>
    </xsd:extension>
   </xsd:complexContent>
  </xsd:complexType>
 </xsd:element>

 <xsd:element name="selector" id="selector">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>
  </xsd:annotation>
  <xsd:complexType>
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
     <xsd:attribute name="xpath" use="required">
      <xsd:simpleType>
       <xsd:annotation>
        <xsd:documentation>A subset of XPath expressions for use
in selectors</xsd:documentation>
        <xsd:documentation>A utility type, not for public
use</xsd:documentation>
       </xsd:annotation>
       <xsd:restriction base="xs:token">
        <xsd:annotation>
         <xsd:documentation>The following pattern is intended to allow XPath
                           expressions per the following EBNF:
          Selector    ::=    Path ( '|' Path )*  
          Path    ::=    ('.//')? Step ( '/' Step )*  
          Step    ::=    '.' | NameTest  
          NameTest    ::=    QName | '*' | NCName ':' '*'  
                           child:: is also allowed
         </xsd:documentation>
        </xsd:annotation>
        <xsd:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">
        </xsd:pattern>
       </xsd:restriction>
      </xsd:simpleType>
     </xsd:attribute>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
 </xsd:element>

 <xsd:element name="field" id="field">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>
  </xsd:annotation>
  <xsd:complexType>
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
     <xsd:attribute name="xpath" use="required">
      <xsd:simpleType>
       <xsd:annotation>
        <xsd:documentation>A subset of XPath expressions for use
in fields</xsd:documentation>
        <xsd:documentation>A utility type, not for public
use</xsd:documentation>
       </xsd:annotation>
       <xsd:restriction base="xs:token">
        <xsd:annotation>
         <xsd:documentation>The following pattern is intended to allow XPath
                           expressions per the same EBNF as for selector,
                           with the following change:
          Path    ::=    ('.//')? ( Step '/' )* ( Step | '@' NameTest ) 
         </xsd:documentation>
        </xsd:annotation>
        <xsd: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*|\*)))))*">
        </xsd:pattern>
       </xsd:restriction>
      </xsd:simpleType>
     </xsd:attribute>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>
 </xsd:element>

 <xsd:complexType name="keybase">
  <xsd:complexContent>
   <xsd:extension base="xs:annotated">
    <xsd:sequence>
     <xsd:element ref="xs:selector"/>
     <xsd:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="name" type="xs:NCName" use="required"/>
   </xsd:extension>
  </xsd:complexContent>
 </xsd:complexType>

 <xsd:group name="identityConstraint">
  <xsd:annotation>
   <xsd:documentation>The three kinds of identity constraints, all with
                     type of or derived from 'keybase'.
   </xsd:documentation>
  </xsd:annotation>
  <xsd:choice>
   <xsd:element ref="xs:unique"/>
   <xsd:element ref="xs:key"/>
   <xsd:element ref="xs:keyref"/>
  </xsd:choice>
 </xsd:group>

 <xsd:element name="unique" type="xs:keybase" id="unique">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/>
  </xsd:annotation>
 </xsd:element>
 <xsd:element name="key" type="xs:keybase" id="key">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/>
  </xsd:annotation>
 </xsd:element>
 <xsd:element name="keyref" id="keyref">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:complexContent>
    <xsd:extension base="xs:keybase">
     <xsd:attribute name="refer" type="xs:QName" use="required"/>
    </xsd:extension>
   </xsd:complexContent>
  </xsd:complexType>
 </xsd:element>

 <xsd:element name="notation" id="notation">
  <xsd:annotation>
   <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:complexContent>
    <xsd:extension base="xs:annotated">
     <xsd:attribute name="name" type="xs:NCName" use="required"/>
     <xsd:attribute name="public" type="xs:public"/>
     <xsd:attribute name="system" type="xs:anyURI"/>
    </xsd:extension>
   </xsd:complexContent>
  </xsd:complexType>
 </xsd:element>

 <xsd:simpleType name="public">
  <xsd:annotation>
   <xsd:documentation>
   A utility type, not for public use</xsd:documentation>
   <xsd:documentation>
   A public identifier, per ISO 8879</xsd:documentation>
  </xsd:annotation>
  <xsd:restriction base="xs:token"/>
 </xsd:simpleType>

 <xsd:element name="appinfo" id="appinfo">
   <xsd:annotation>
     <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/>
   </xsd:annotation>
   <xsd:complexType mixed="true">
    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
     <xsd:any processContents="lax"/>
    </xsd:sequence>
    <xsd:attribute name="source" type="xs:anyURI"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:complexType>
 </xsd:element>

 <xsd:element name="documentation" id="documentation">
   <xsd:annotation>
     <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/>
   </xsd:annotation>
   <xsd:complexType mixed="true">
    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
     <xsd:any processContents="lax"/>
    </xsd:sequence>
    <xsd:attribute name="source" type="xs:anyURI"/>
    <xsd:attribute ref="xml:lang"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:complexType>
 </xsd:element>

 <xsd:element name="annotation" id="annotation">
   <xsd:annotation>
     <xsd:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/>
   </xsd:annotation>
   <xsd:complexType>
    <xsd:complexContent>
     <xsd:extension base="xs:openAttrs">
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
       <xsd:element ref="xs:appinfo"/>
       <xsd:element ref="xs:documentation"/>
      </xsd:choice>
      <xsd:attribute name="id" type="xs:ID"/>
     </xsd:extension>
    </xsd:complexContent>
   </xsd:complexType>
 </xsd:element>

 <xsd:annotation>
  <xsd:documentation>
   notations for use within XML Schema schemas</xsd:documentation>
 </xsd:annotation>

 <xsd:notation name="XMLSchemaStructures" public="structures" system="http://www.w3.org/2000/08/XMLSchema.xsd"/>
 <xsd:notation name="XML" public="REC-xml-19980210" system="http://www.w3.org/TR/1998/REC-xml-19980210"/>
  
 <xsd:complexType name="anyType" mixed="true">
  <xsd:annotation>
   <xsd:documentation>
   Not the real urType, but as close an approximation as we can
   get in the XML representation</xsd:documentation>
  </xsd:annotation>
  <xsd:sequence>
   <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
  </xsd:sequence>
  <xsd:anyAttribute processContents="lax"/>
 </xsd:complexType>

  <xsd:annotation>
    <xsd:documentation>
      First the built-in primitive datatypes.  These definitions are for
      information only, the real built-in definitions are magic.
    </xsd:documentation>

    <xsd:documentation>
      For each built-in datatype in this schema (both primitive and
      derived) can be uniquely addressed via a URI constructed
      as follows:
        1) the base URI is the URI of the XML Schema namespace
        2) the fragment identifier is the name of the datatype

      For example, to address the int datatype, the URI is:

        http://www.w3.org/2001/XMLSchema#int

      Additionally, each facet definition element can be uniquely
      addressed via a URI constructed as follows:
        1) the base URI is the URI of the XML Schema namespace
        2) the fragment identifier is the name of the facet

      For example, to address the maxInclusive facet, the URI is:

        http://www.w3.org/2001/XMLSchema#maxInclusive

      Additionally, each facet usage in a built-in datatype definition
      can be uniquely addressed via a URI constructed as follows:
        1) the base URI is the URI of the XML Schema namespace
        2) the fragment identifier is the name of the datatype, followed
           by a period (".") followed by the name of the facet

      For example, to address the usage of the maxInclusive facet in
      the definition of int, the URI is:

        http://www.w3.org/2001/XMLSchema#int.maxInclusive

    </xsd:documentation>
  </xsd:annotation>

  <xsd:simpleType name="string" id="string">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#string"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="preserve" id="string.preserve"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="boolean" id="boolean">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="finite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#boolean"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="boolean.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="float" id="float">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="total"/>
        <hfp:hasProperty name="bounded" value="true"/>
        <hfp:hasProperty name="cardinality" value="finite"/>
        <hfp:hasProperty name="numeric" value="true"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#float"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="float.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="double" id="double">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="total"/>
        <hfp:hasProperty name="bounded" value="true"/>
        <hfp:hasProperty name="cardinality" value="finite"/>
        <hfp:hasProperty name="numeric" value="true"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#double"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="double.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="decimal" id="decimal">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="totalDigits"/>
        <hfp:hasFacet name="fractionDigits"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="total"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="true"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#decimal"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="decimal.whiteSpace"/>
    </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="duration" id="duration">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="partial"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#duration"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="duration.whiteSpace"/>
    </xsd:restriction>
   </xsd:simpleType>

 <xsd:simpleType name="dateTime" id="dateTime">
    <xsd:annotation>
    <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="partial"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#dateTime"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="dateTime.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="time" id="time">
    <xsd:annotation>
    <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="partial"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#time"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="time.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="date" id="date">
   <xsd:annotation>
    <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="partial"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#date"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="date.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="gYearMonth" id="gYearMonth">
   <xsd:annotation>
    <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="partial"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="gYearMonth.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="gYear" id="gYear">
    <xsd:annotation>
    <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="partial"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#gYear"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="gYear.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

 <xsd:simpleType name="gMonthDay" id="gMonthDay">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="partial"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
       <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
         <xsd:whiteSpace value="collapse" fixed="true" id="gMonthDay.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="gDay" id="gDay">
    <xsd:annotation>
  <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="partial"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#gDay"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
         <xsd:whiteSpace value="collapse" fixed="true" id="gDay.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

 <xsd:simpleType name="gMonth" id="gMonth">
    <xsd:annotation>
  <xsd:appinfo>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="maxInclusive"/>
        <hfp:hasFacet name="maxExclusive"/>
        <hfp:hasFacet name="minInclusive"/>
        <hfp:hasFacet name="minExclusive"/>
        <hfp:hasProperty name="ordered" value="partial"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonth"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
         <xsd:whiteSpace value="collapse" fixed="true" id="gMonth.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

   <xsd:simpleType name="hexBinary" id="hexBinary">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#binary"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="hexBinary.whiteSpace"/>
    </xsd:restriction>
   </xsd:simpleType>

 <xsd:simpleType name="base64Binary" id="base64Binary">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="base64Binary.whiteSpace"/>
    </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="anyURI" id="anyURI">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="anyURI.whiteSpace"/>
    </xsd:restriction>
   </xsd:simpleType>

  <xsd:simpleType name="QName" id="QName">
    <xsd:annotation>
        <xsd:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#QName"/>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="QName.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

   <xsd:simpleType name="NOTATION" id="NOTATION">
    <xsd:annotation>
        <xsd:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>
      <xsd:documentation>
        NOTATION cannot be used directly in a schema; rather a type
        must be derived from it by specifying at least one enumeration
        facet whose value is the name of a NOTATION declared in the
        schema.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xs:anySimpleType">
      <xsd:whiteSpace value="collapse" fixed="true" id="NOTATION.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:annotation>
    <xsd:documentation>
      Now the derived primitive types
    </xsd:documentation>
  </xsd:annotation>

  <xsd:simpleType name="normalizedString" id="normalizedString">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
    </xsd:annotation>
    <xsd:restriction base="xs:string">
      <xsd:whiteSpace value="replace" id="normalizedString.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="token" id="token">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#token"/>
    </xsd:annotation>
    <xsd:restriction base="xs:normalizedString">
      <xsd:whiteSpace value="collapse" id="token.whiteSpace"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="language" id="language">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#language"/>
    </xsd:annotation>
    <xsd:restriction base="xs:token">
      <xsd:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" id="language.pattern">
        <xsd:annotation>
          <xsd:documentation source="http://www.ietf.org/rfc/rfc3066.txt">
            pattern specifies the content of section 2.12 of XML 1.0e2
            and RFC 3066 (Revised version of RFC 1766).
          </xsd:documentation>
        </xsd:annotation>
      </xsd:pattern>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="IDREFS" id="IDREFS">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>
    </xsd:annotation>
    <xsd:restriction>
      <xsd:simpleType>
        <xsd:list itemType="xs:IDREF"/>
      </xsd:simpleType>
        <xsd:minLength value="1" id="IDREFS.minLength"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="ENTITIES" id="ENTITIES">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>
    </xsd:annotation>
    <xsd:restriction>
      <xsd:simpleType>
        <xsd:list itemType="xs:ENTITY"/>
      </xsd:simpleType>
        <xsd:minLength value="1" id="ENTITIES.minLength"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="NMTOKEN" id="NMTOKEN">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>
    </xsd:annotation>
    <xsd:restriction base="xs:token">
      <xsd:pattern value="\c+" id="NMTOKEN.pattern">
        <xsd:annotation>
          <xsd:documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
            pattern matches production 7 from the XML spec
          </xsd:documentation>
        </xsd:annotation>
      </xsd:pattern>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="NMTOKENS" id="NMTOKENS">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>
    </xsd:annotation>
    <xsd:restriction>
      <xsd:simpleType>
        <xsd:list itemType="xs:NMTOKEN"/>
      </xsd:simpleType>
        <xsd:minLength value="1" id="NMTOKENS.minLength"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="Name" id="Name">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#Name"/>
    </xsd:annotation>
    <xsd:restriction base="xs:token">
      <xsd:pattern value="\i\c*" id="Name.pattern">
        <xsd:annotation>
          <xsd:documentation source="http://www.w3.org/TR/REC-xml#NT-Name">
            pattern matches production 5 from the XML spec
          </xsd:documentation>
        </xsd:annotation>
      </xsd:pattern>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="NCName" id="NCName">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#NCName"/>
    </xsd:annotation>
    <xsd:restriction base="xs:Name">
      <xsd:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern">
        <xsd:annotation>
          <xsd:documentation source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">
            pattern matches production 4 from the Namespaces in XML spec
          </xsd:documentation>
        </xsd:annotation>
      </xsd:pattern>
    </xsd:restriction>
  </xsd:simpleType>

   <xsd:simpleType name="ID" id="ID">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#ID"/>
    </xsd:annotation>
    <xsd:restriction base="xs:NCName"/>
   </xsd:simpleType>

   <xsd:simpleType name="IDREF" id="IDREF">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREF"/>
    </xsd:annotation>
    <xsd:restriction base="xs:NCName"/>
   </xsd:simpleType>

   <xsd:simpleType name="ENTITY" id="ENTITY">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/>
    </xsd:annotation>
    <xsd:restriction base="xs:NCName"/>
   </xsd:simpleType>

  <xsd:simpleType name="integer" id="integer">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#integer"/>
    </xsd:annotation>
    <xsd:restriction base="xs:decimal">
      <xsd:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/>
      <xsd:pattern value="[\-+]?[0-9]+"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="nonPositiveInteger" id="nonPositiveInteger">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/>
    </xsd:annotation>
    <xsd:restriction base="xs:integer">
      <xsd:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="negativeInteger" id="negativeInteger">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/>
    </xsd:annotation>
    <xsd:restriction base="xs:nonPositiveInteger">
      <xsd:maxInclusive value="-1" id="negativeInteger.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="long" id="long">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasProperty name="bounded" value="true"/>
        <hfp:hasProperty name="cardinality" value="finite"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#long"/>
    </xsd:annotation>
    <xsd:restriction base="xs:integer">
      <xsd:minInclusive value="-9223372036854775808" id="long.minInclusive"/>
      <xsd:maxInclusive value="9223372036854775807" id="long.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="int" id="int">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#int"/>
    </xsd:annotation>
    <xsd:restriction base="xs:long">
      <xsd:minInclusive value="-2147483648" id="int.minInclusive"/>
      <xsd:maxInclusive value="2147483647" id="int.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="short" id="short">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#short"/>
    </xsd:annotation>
    <xsd:restriction base="xs:int">
      <xsd:minInclusive value="-32768" id="short.minInclusive"/>
      <xsd:maxInclusive value="32767" id="short.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="byte" id="byte">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#byte"/>
    </xsd:annotation>
    <xsd:restriction base="xs:short">
      <xsd:minInclusive value="-128" id="byte.minInclusive"/>
      <xsd:maxInclusive value="127" id="byte.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="nonNegativeInteger" id="nonNegativeInteger">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/>
    </xsd:annotation>
    <xsd:restriction base="xs:integer">
      <xsd:minInclusive value="0" id="nonNegativeInteger.minInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="unsignedLong" id="unsignedLong">
    <xsd:annotation>
      <xsd:appinfo>
        <hfp:hasProperty name="bounded" value="true"/>
        <hfp:hasProperty name="cardinality" value="finite"/>
      </xsd:appinfo>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/>
    </xsd:annotation>
    <xsd:restriction base="xs:nonNegativeInteger">
      <xsd:maxInclusive value="18446744073709551615" id="unsignedLong.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="unsignedInt" id="unsignedInt">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/>
    </xsd:annotation>
    <xsd:restriction base="xs:unsignedLong">
      <xsd:maxInclusive value="4294967295" id="unsignedInt.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="unsignedShort" id="unsignedShort">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/>
    </xsd:annotation>
    <xsd:restriction base="xs:unsignedInt">
      <xsd:maxInclusive value="65535" id="unsignedShort.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="unsignedByte" id="unsignedByte">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/>
    </xsd:annotation>
    <xsd:restriction base="xs:unsignedShort">
      <xsd:maxInclusive value="255" id="unsignedByte.maxInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="positiveInteger" id="positiveInteger">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/>
    </xsd:annotation>
    <xsd:restriction base="xs:nonNegativeInteger">
      <xsd:minInclusive value="1" id="positiveInteger.minInclusive"/>
    </xsd:restriction>
  </xsd:simpleType>

 <xsd:simpleType name="derivationControl">
  <xsd:annotation>
   <xsd:documentation>
   A utility type, not for public use</xsd:documentation>
  </xsd:annotation>
  <xsd:restriction base="xs:NMTOKEN">
   <xsd:enumeration value="substitution"/>
   <xsd:enumeration value="extension"/>
   <xsd:enumeration value="restriction"/>
   <xsd:enumeration value="list"/>
   <xsd:enumeration value="union"/>
  </xsd:restriction>
 </xsd:simpleType>

 <xsd:group name="simpleDerivation">
  <xsd:choice>
    <xsd:element ref="xs:restriction"/>
    <xsd:element ref="xs:list"/>
    <xsd:element ref="xs:union"/>
  </xsd:choice>
 </xsd:group>

 <xsd:simpleType name="simpleDerivationSet">
  <xsd:annotation>
   <xsd:documentation>
   #all or (possibly empty) subset of {restriction, union, list}
   </xsd:documentation>
   <xsd:documentation>
   A utility type, not for public use</xsd:documentation>
  </xsd:annotation>
  <xsd:union>
   <xsd:simpleType>
    <xsd:restriction base="xs:token">
     <xsd:enumeration value="#all"/>
    </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType>
    <xsd:list>
     <xsd:simpleType>
      <xsd:restriction base="xs:derivationControl">
       <xsd:enumeration value="list"/>
       <xsd:enumeration value="union"/>
       <xsd:enumeration value="restriction"/>
      </xsd:restriction>
     </xsd:simpleType>
    </xsd:list>
   </xsd:simpleType>
  </xsd:union>
 </xsd:simpleType>

  <xsd:complexType name="simpleType" abstract="true">
    <xsd:complexContent>
      <xsd:extension base="xs:annotated">
        <xsd:group ref="xs:simpleDerivation"/>
        <xsd:attribute name="final" type="xs:simpleDerivationSet"/>
        <xsd:attribute name="name" type="xs:NCName">
          <xsd:annotation>
            <xsd:documentation>
              Can be restricted to required or forbidden
            </xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="topLevelSimpleType">
    <xsd:complexContent>
      <xsd:restriction base="xs:simpleType">
        <xsd:sequence>
          <xsd:element ref="xs:annotation" minOccurs="0"/>
          <xsd:group ref="xs:simpleDerivation"/>
        </xsd:sequence>
        <xsd:attribute name="name" use="required" type="xs:NCName">
          <xsd:annotation>
            <xsd:documentation>
              Required at the top level
            </xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
       <xsd:anyAttribute namespace="##other" processContents="lax"/>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="localSimpleType">
    <xsd:complexContent>
      <xsd:restriction base="xs:simpleType">
        <xsd:sequence>
          <xsd:element ref="xs:annotation" minOccurs="0"/>
          <xsd:group ref="xs:simpleDerivation"/>
        </xsd:sequence>
        <xsd:attribute name="name" use="prohibited">
          <xsd:annotation>
            <xsd:documentation>
              Forbidden when nested
            </xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="final" use="prohibited"/>
       <xsd:anyAttribute namespace="##other" processContents="lax"/>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/>
    </xsd:annotation>
  </xsd:element>

  <xsd:group name="facets">
   <xsd:annotation>
    <xsd:documentation>
       We should use a substitution group for facets, but
       that's ruled out because it would allow users to
       add their own, which we're not ready for yet.
    </xsd:documentation>
   </xsd:annotation>
   <xsd:choice>
    <xsd:element ref="xs:minExclusive"/>
    <xsd:element ref="xs:minInclusive"/>
    <xsd:element ref="xs:maxExclusive"/>
    <xsd:element ref="xs:maxInclusive"/>
    <xsd:element ref="xs:totalDigits"/>
    <xsd:element ref="xs:fractionDigits"/>
    <xsd:element ref="xs:length"/>
    <xsd:element ref="xs:minLength"/>
    <xsd:element ref="xs:maxLength"/>
    <xsd:element ref="xs:enumeration"/>
    <xsd:element ref="xs:whiteSpace"/>
    <xsd:element ref="xs:pattern"/>
   </xsd:choice>
  </xsd:group>

  <xsd:group name="simpleRestrictionModel">
   <xsd:sequence>
    <xsd:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>
    <xsd:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/>
   </xsd:sequence>
  </xsd:group>

  <xsd:element name="restriction" id="restriction">
   <xsd:complexType>
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-restriction">
          base attribute and simpleType child are mutually
          exclusive, but one or other is required
        </xsd:documentation>
      </xsd:annotation>
      <xsd:complexContent>
        <xsd:extension base="xs:annotated">
         <xsd:group ref="xs:simpleRestrictionModel"/>
         <xsd:attribute name="base" type="xs:QName" use="optional"/>
        </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
  </xsd:element>

  <xsd:element name="list" id="list">
   <xsd:complexType>
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-list">
          itemType attribute and simpleType child are mutually
          exclusive, but one or other is required
        </xsd:documentation>
      </xsd:annotation>
      <xsd:complexContent>
        <xsd:extension base="xs:annotated">
          <xsd:sequence>
            <xsd:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>
          </xsd:sequence>
          <xsd:attribute name="itemType" type="xs:QName" use="optional"/>
        </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
  </xsd:element>

  <xsd:element name="union" id="union">
   <xsd:complexType>
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-union">
          memberTypes attribute must be non-empty or there must be
          at least one simpleType child
        </xsd:documentation>
      </xsd:annotation>
      <xsd:complexContent>
        <xsd:extension base="xs:annotated">
          <xsd:sequence>
            <xsd:element name="simpleType" type="xs:localSimpleType" minOccurs="0" maxOccurs="unbounded"/>
          </xsd:sequence>
          <xsd:attribute name="memberTypes" use="optional">
            <xsd:simpleType>
              <xsd:list itemType="xs:QName"/>
            </xsd:simpleType>
          </xsd:attribute>
        </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
  </xsd:element>

  <xsd:complexType name="facet">
    <xsd:complexContent>
      <xsd:extension base="xs:annotated">
        <xsd:attribute name="value" use="required"/>
        <xsd:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

 <xsd:complexType name="noFixedFacet">
  <xsd:complexContent>
   <xsd:restriction base="xs:facet">
    <xsd:sequence>
     <xsd:element ref="xs:annotation" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="fixed" use="prohibited"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>

  <xsd:element name="minExclusive" id="minExclusive" type="xs:facet">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/>
    </xsd:annotation>
  </xsd:element>
  <xsd:element name="minInclusive" id="minInclusive" type="xs:facet">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/>
    </xsd:annotation>
  </xsd:element>

  <xsd:element name="maxExclusive" id="maxExclusive" type="xs:facet">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/>
    </xsd:annotation>
  </xsd:element>
  <xsd:element name="maxInclusive" id="maxInclusive" type="xs:facet">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/>
    </xsd:annotation>
  </xsd:element>

  <xsd:complexType name="numFacet">
    <xsd:complexContent>
      <xsd:restriction base="xs:facet">
       <xsd:sequence>
         <xsd:element ref="xs:annotation" minOccurs="0"/>
       </xsd:sequence>
       <xsd:attribute name="value" type="xs:nonNegativeInteger" use="required"/>
       <xsd:anyAttribute namespace="##other" processContents="lax"/>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:element name="totalDigits" id="totalDigits">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:complexContent>
        <xsd:restriction base="xs:numFacet">
          <xsd:sequence>
            <xsd:element ref="xs:annotation" minOccurs="0"/>
          </xsd:sequence>
          <xsd:attribute name="value" type="xs:positiveInteger" use="required"/>
         <xsd:anyAttribute namespace="##other" processContents="lax"/>
        </xsd:restriction>
      </xsd:complexContent>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="fractionDigits" id="fractionDigits" type="xs:numFacet">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>
    </xsd:annotation>
  </xsd:element>

  <xsd:element name="length" id="length" type="xs:numFacet">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-length"/>
    </xsd:annotation>
  </xsd:element>
  <xsd:element name="minLength" id="minLength" type="xs:numFacet">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/>
    </xsd:annotation>
  </xsd:element>
  <xsd:element name="maxLength" id="maxLength" type="xs:numFacet">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/>
    </xsd:annotation>
  </xsd:element>

  <xsd:element name="enumeration" id="enumeration" type="xs:noFixedFacet">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/>
    </xsd:annotation>
  </xsd:element>

  <xsd:element name="whiteSpace" id="whiteSpace">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:complexContent>
        <xsd:restriction base="xs:facet">
          <xsd:sequence>
            <xsd:element ref="xs:annotation" minOccurs="0"/>
          </xsd:sequence>
          <xsd:attribute name="value" use="required">
            <xsd:simpleType>
              <xsd:restriction base="xs:NMTOKEN">
                <xsd:enumeration value="preserve"/>
                <xsd:enumeration value="replace"/>
                <xsd:enumeration value="collapse"/>
              </xsd:restriction>
            </xsd:simpleType>
          </xsd:attribute>
         <xsd:anyAttribute namespace="##other" processContents="lax"/>
        </xsd:restriction>
      </xsd:complexContent>
    </xsd:complexType>
  </xsd:element>

  <xsd:element name="pattern" id="pattern">
    <xsd:annotation>
      <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:complexContent>
        <xsd:restriction base="xs:noFixedFacet">
          <xsd:sequence>
            <xsd:element ref="xs:annotation" minOccurs="0"/>
          </xsd:sequence>
          <xsd:attribute name="value" type="xs:string" use="required"/>
         <xsd:anyAttribute namespace="##other" processContents="lax"/>
        </xsd:restriction>
      </xsd:complexContent>
    </xsd:complexType>
  </xsd:element>

</xsd:schema>
