File:  [LON-CAPA] / modules / damieng / graphical_editor / loncapa_daxe / web / config / SimplerSchema.xsd
Revision 1.1: download - view: text, annotated - select for diffs
Wed Aug 12 14:58:59 2015 UTC (9 years, 2 months ago) by damieng
Branches: MAIN
CVS tags: HEAD
misc improvements and bug fixes to use Daxe with other languages as a desktop application

<?xml version='1.0' encoding='UTF-8'?>

<!-- ceci est une version simplifiée du schéma des schémas XML fourni par le W3C -->
<!-- elle correspond en gros à ce que Jaxe comprend des schémas XML -->
<!-- mais reste à peu près compatible (ce schéma est d'ailleurs un schéma XML valide) -->

<!-- this is a simplified version of the W3C's XML schema schema -->
<!-- it features what Jaxe understands of XML schemas -->
<!-- but keeps about compatible (this simplified schema is actually a valid XML schema) -->

<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN">

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

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

 <xs:group name="schemaTop">
  <xs:annotation>
   <xs: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.</xs:documentation>
  </xs:annotation>
  <xs:choice>
   <xs:group ref="xs:redefinable"/>
   <xs:element ref="xs:element"/>
   <xs:element ref="xs:attribute"/>
  </xs:choice>
 </xs:group>
 
 <xs:group name="redefinable">
  <xs:annotation>
   <xs:documentation>
   This group is for the
   elements which can self-redefine (see &lt;redefine> below).</xs:documentation>
  </xs:annotation>
  <xs:choice>
   <xs:element ref="xs:simpleType"/>
   <xs:element ref="xs:complexType"/>
   <xs:element ref="xs:group"/>
   <xs:element ref="xs:attributeGroup"/>
  </xs:choice>
 </xs:group>

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

 <xs:element name="schema">
  <xs:annotation>
    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>
  </xs:annotation>
  <xs:complexType>
     <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
       <xs:element ref="xs:include"/>
       <xs:element ref="xs:import"/>
       <xs:element ref="xs:redefine"/>
       <xs:element ref="xs:annotation"/>
      </xs:choice>
      <xs:sequence minOccurs="0" maxOccurs="unbounded">
       <xs:group ref="xs:schemaTop"/>
       <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
     </xs:sequence>
     <xs:attribute name="targetNamespace" type="xs:anyURI"/>
     <xs:attribute name="version" type="xs:token"/>
     <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
     <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
     <xs:attribute ref="xml:lang"/>
  </xs:complexType>
  
  <xs:key name="element">
   <xs:selector xpath="xs:element"/>
   <xs:field xpath="@name"/>
  </xs:key>

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

  <xs:key name="type">
   <xs:selector xpath="xs:complexType|xs:simpleType"/>
   <xs:field xpath="@name"/>
  </xs:key>
 
  <xs:key name="group">
   <xs:selector xpath="xs:group"/>
   <xs:field xpath="@name"/>
  </xs:key>
 
  <xs:key name="attributeGroup">
   <xs:selector xpath="xs:attributeGroup"/>
   <xs:field xpath="@name"/>
  </xs:key>
 
  <xs:key name="identityConstraint">
   <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
   <xs:field xpath="@name"/>
  </xs:key>
  
 </xs:element>

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

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

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

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

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

 <xs:group name="complexTypeModel">
  <xs:choice>
      <xs:element ref="xs:simpleContent"/>
      <xs:element ref="xs:complexContent"/>
      <xs:sequence>
       <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
       <xs:group ref="xs:attrDecls"/>
      </xs:sequence>
  </xs:choice>
 </xs:group>

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

 <xs:complexType name="complexRestrictionType">
  <xs:complexContent>
   <xs:restriction base="xs:restrictionType">
    <xs:sequence>
     <xs:element ref="xs:annotation" minOccurs="0"/>
     <xs:choice minOccurs="0">
      <xs:annotation>
       <xs:documentation>This choice is added simply to
                   make this a valid restriction per the REC</xs:documentation>
      </xs:annotation>
      <xs:group ref="xs:typeDefParticle"/>
     </xs:choice>
     <xs:group ref="xs:attrDecls"/>
    </xs:sequence>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>
 
 <xs:complexType name="extensionType">
  <xs:complexContent>
   <xs:extension base="xs:annotated">
    <xs:sequence>
     <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
     <xs:group ref="xs:attrDecls"/>
    </xs:sequence>
    <xs:attribute name="base" type="xs:QName" use="required"/>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>

 <xs:element name="complexContent">
  <xs:annotation>
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>
  </xs:annotation>
  <xs:complexType>
   <xs:complexContent>
    <xs:extension base="xs:annotated">
     <xs:choice>
      <xs:element name="restriction" type="xs:complexRestrictionType"/>
      <xs:element name="extension" type="xs:extensionType"/>
     </xs:choice>
     <xs:attribute name="mixed" type="xs:boolean">
      <xs:annotation>
       <xs:documentation>
       Overrides any setting on complexType parent.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    </xs:extension>
   </xs:complexContent>
  </xs:complexType>
 </xs:element>
 
 <xs:complexType name="simpleRestrictionType">
  <xs:complexContent>
   <xs:restriction base="xs:restrictionType">
    <xs:sequence>
     <xs:element ref="xs:annotation" minOccurs="0"/>
     <xs:choice minOccurs="0">
      <xs:annotation>
       <xs:documentation>This choice is added simply to
                   make this a valid restriction per the REC</xs:documentation>
      </xs:annotation>
      <xs:group ref="xs:simpleRestrictionModel"/>
     </xs:choice>
     <xs:group ref="xs:attrDecls"/>
    </xs:sequence>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>

 <xs:complexType name="simpleExtensionType">
  <xs:complexContent>
   <xs:restriction base="xs:extensionType">
    <xs:sequence>
     <xs:annotation>
      <xs:documentation>
      No typeDefParticle group reference</xs:documentation>
     </xs:annotation>
     <xs:element ref="xs:annotation" minOccurs="0"/>
     <xs:group ref="xs:attrDecls"/>
    </xs:sequence>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>

 <xs:element name="simpleContent">
  <xs:annotation>
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>
  </xs:annotation>
  <xs:complexType>
   <xs:complexContent>
    <xs:extension base="xs:annotated">
     <xs:choice>
      <xs:element name="restriction" type="xs:simpleRestrictionType"/>
      <xs:element name="extension" type="xs:simpleExtensionType"/>
     </xs:choice>
    </xs:extension>
   </xs:complexContent>
  </xs:complexType>
 </xs:element>
 
 <xs:element name="complexType" type="xs:topLevelComplexType">
  <xs:annotation>
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>
  </xs:annotation>
 </xs:element>
 
 <xs:complexType name="element" abstract="true">
  <xs:annotation>
   <xs: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.</xs:documentation>
  </xs:annotation>

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

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

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

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

 <xs:complexType name="groupRef">
  <xs:complexContent>
   <xs:restriction base="xs:realGroup">
    <xs:sequence>
     <xs:element ref="xs:annotation" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="ref" use="required" type="xs:QName"/>
    <xs:attribute name="name" use="prohibited"/>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>

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

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

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

 <xs:complexType name="simpleExplicitGroup">
  <xs:complexContent>
   <xs:restriction base="xs:explicitGroup">
    <xs:sequence>
     <xs:element ref="xs:annotation" minOccurs="0"/>
     <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="minOccurs" use="prohibited"/>
    <xs:attribute name="maxOccurs" use="prohibited"/>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>
 
 <xs:element name="choice" type="xs:explicitGroup">
  <xs:annotation>
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>
  </xs:annotation>
 </xs:element>

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

 <xs:element name="group" type="xs:namedGroup">
  <xs:annotation>
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>
  </xs:annotation>
 </xs:element>
 
 <xs:complexType name="wildcard">
  <xs:complexContent>
   <xs:extension base="xs:annotated">
    <xs:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/>
    <xs:attribute name="processContents" use="optional" default="strict">
     <xs:simpleType>
      <xs:restriction base="xs:NMTOKEN">
       <xs:enumeration value="skip"/>
       <xs:enumeration value="lax"/>
       <xs:enumeration value="strict"/>
      </xs:restriction>
     </xs:simpleType>
    </xs:attribute>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>
 
 <xs:element name="any">
  <xs:annotation>
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>
  </xs:annotation>
  <xs:complexType>
   <xs:complexContent>
    <xs:extension base="xs:wildcard">
     <xs:attributeGroup ref="xs:occurs"/>
    </xs:extension>
   </xs:complexContent>
  </xs:complexType>
 </xs:element>
 
  <xs:annotation>
   <xs:documentation>
   simple type for the value of the 'namespace' attr of
   'any' and 'anyAttribute'</xs:documentation>
  </xs:annotation>
  <xs:annotation>
   <xs: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</xs:documentation>
  </xs:annotation>

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

 <xs:element name="attribute" type="xs:topLevelAttribute">
  <xs:annotation>
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>
  </xs:annotation>
 </xs:element>
 
 <xs:complexType name="attributeGroup" abstract="true">
  <xs:complexContent>
   <xs:extension base="xs:annotated">
    <xs:group ref="xs:attrDecls"/>
    <xs:attributeGroup ref="xs:defRef"/>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>

 <xs:complexType name="namedAttributeGroup">
  <xs:complexContent>
   <xs:restriction base="xs:attributeGroup">
    <xs:sequence>
     <xs:element ref="xs:annotation" minOccurs="0"/>
     <xs:group ref="xs:attrDecls"/>
    </xs:sequence>
    <xs:attribute name="name" use="required" type="xs:NCName"/>
    <xs:attribute name="ref" use="prohibited"/>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>

 <xs:complexType name="attributeGroupRef">
  <xs:complexContent>
   <xs:restriction base="xs:attributeGroup">
    <xs:sequence>
     <xs:element ref="xs:annotation" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="ref" use="required" type="xs:QName"/>
    <xs:attribute name="name" use="prohibited"/>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>

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

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

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

 <xs:element name="selector">
  <xs:annotation>
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>
  </xs:annotation>
  <xs:complexType>
  <xs:complexContent>
   <xs:extension base="xs:annotated">
     <xs:attribute name="xpath" use="required">
      <xs:simpleType>
       <xs:annotation>
        <xs:documentation>A subset of XPath expressions for use
in selectors</xs:documentation>
        <xs:documentation>A utility type, not for public
use</xs:documentation>
       </xs:annotation>
       <xs:restriction base="xs:token">
        <xs:annotation>
         <xs: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
         </xs:documentation>
        </xs:annotation>
        <xs:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">
        </xs:pattern>
       </xs:restriction>
      </xs:simpleType>
     </xs:attribute>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>
 </xs:element>

 <xs:element name="field">
  <xs:annotation>
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>
  </xs:annotation>
  <xs:complexType>
  <xs:complexContent>
   <xs:extension base="xs:annotated">
     <xs:attribute name="xpath" use="required">
      <xs:simpleType>
       <xs:annotation>
        <xs:documentation>A subset of XPath expressions for use
in fields</xs:documentation>
        <xs:documentation>A utility type, not for public
use</xs:documentation>
       </xs:annotation>
       <xs:restriction base="xs:token">
        <xs:annotation>
         <xs: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 ) 
         </xs:documentation>
        </xs:annotation>
        <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*|\*)))))*">
        </xs:pattern>
       </xs:restriction>
      </xs:simpleType>
     </xs:attribute>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>
 </xs:element>

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

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

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

 <xs:element name="documentation">
   <xs:annotation>
     <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/>
   </xs:annotation>
   <xs:complexType mixed="true">
     <xs:attribute name="source" type="xs:anyURI"/>
   <xs:attribute ref="xml:lang"/>
   </xs:complexType>
 </xs:element>

 <xs:element name="annotation">
   <xs:annotation>
     <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/>
   </xs:annotation>
   <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
       <xs:element ref="xs:documentation"/>
      </xs:choice>
   </xs:complexType>
 </xs:element>


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

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

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

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

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

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

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

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

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

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

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

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

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

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

   <xs:simpleType name="hexBinary">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#binary"/>
    </xs:annotation>
    <xs:restriction base="xs:anySimpleType">
    </xs:restriction>
  </xs:simpleType>
 
 <xs:simpleType name="base64Binary">
    <xs:annotation>
      <xs:documentation
                source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>
    </xs:annotation>
    <xs:restriction base="xs:anySimpleType">
    </xs:restriction>
  </xs:simpleType>

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

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

   <xs:simpleType name="NOTATION">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>
      <xs: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.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:anySimpleType">
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="normalizedString">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
    </xs:annotation>
    <xs:restriction base="xs:anySimpleType">
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="token">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#token"/>
    </xs:annotation>
    <xs:restriction base="xs:anySimpleType">
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="language">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#language"/>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:pattern
        value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*">
        <xs:annotation>
          <xs: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).
          </xs:documentation>
        </xs:annotation>
      </xs:pattern>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="IDREFS">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>
    </xs:annotation>
    <xs:restriction>
      <xs:simpleType>
        <xs:list itemType="xs:IDREF"/>
      </xs:simpleType>
        <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ENTITIES">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>
    </xs:annotation>
    <xs:restriction>
      <xs:simpleType>
        <xs:list itemType="xs:ENTITY"/>
      </xs:simpleType>
        <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

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

  <xs:simpleType name="NMTOKENS">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>
    </xs:annotation>
    <xs:restriction>
      <xs:simpleType>
        <xs:list itemType="xs:NMTOKEN"/>
      </xs:simpleType>
        <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

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

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

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

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

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

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

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

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

  <xs:simpleType name="long">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#long"/>
    </xs:annotation>
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="-9223372036854775808"/>
      <xs:maxInclusive value="9223372036854775807"/>
    </xs:restriction>
  </xs:simpleType>

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

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

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

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

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

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

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

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

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

 <xs:group name="simpleDerivation">
  <xs:choice>
    <xs:element ref="xs:restriction"/>
    <xs:element ref="xs:list"/>
    <xs:element ref="xs:union"/>
  </xs:choice>
 </xs:group>
 
  <xs:complexType name="simpleType" abstract="true">
    <xs:complexContent>
      <xs:extension base="xs:annotated">
        <xs:group ref="xs:simpleDerivation"/>
        <xs:attribute name="name" type="xs:NCName">
          <xs:annotation>
            <xs:documentation>
              Can be restricted to required or forbidden
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

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

  <xs:complexType name="localSimpleType">
    <xs:complexContent>
      <xs:restriction base="xs:simpleType">
        <xs:sequence>
          <xs:element ref="xs:annotation" minOccurs="0"/>
          <xs:group ref="xs:simpleDerivation"/>
        </xs:sequence>
        <xs:attribute name="name" use="prohibited">
          <xs:annotation>
            <xs:documentation>
              Forbidden when nested
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

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

  <xs:group name="facets">
   <xs:annotation>
    <xs: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.
    </xs:documentation>
   </xs:annotation>
   <xs:choice>
    <xs:element ref="xs:minExclusive"/>
    <xs:element ref="xs:minInclusive"/>
    <xs:element ref="xs:maxExclusive"/>
    <xs:element ref="xs:maxInclusive"/>
    <xs:element ref="xs:totalDigits"/>
    <xs:element ref="xs:fractionDigits"/>
    <xs:element ref="xs:length"/>
    <xs:element ref="xs:minLength"/>
    <xs:element ref="xs:maxLength"/>
    <xs:element ref="xs:enumeration"/>
    <xs:element ref="xs:pattern"/>
   </xs:choice>
  </xs:group>

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

  <xs:element name="restriction">
   <xs:complexType>
    <xs:annotation>
      <xs: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
        </xs:documentation>
      </xs:annotation>
      <xs:complexContent>
        <xs:extension base="xs:annotated">
         <xs:group ref="xs:simpleRestrictionModel"/>
         <xs:attribute name="base" type="xs:QName" use="optional"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="list">
   <xs:complexType>
    <xs:annotation>
      <xs: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
        </xs:documentation>
      </xs:annotation>
      <xs:complexContent>
        <xs:extension base="xs:annotated">
          <xs:sequence>
            <xs:element name="simpleType" type="xs:localSimpleType"
                minOccurs="0"/>
          </xs:sequence>
          <xs:attribute name="itemType" type="xs:QName" use="optional"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="union">
   <xs:complexType>
    <xs:annotation>
      <xs: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
        </xs:documentation>
      </xs:annotation>
      <xs:complexContent>
        <xs:extension base="xs:annotated">
          <xs:sequence>
            <xs:element name="simpleType" type="xs:localSimpleType"
                minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:attribute name="memberTypes" use="optional">
            <xs:simpleType>
              <xs:list itemType="xs:QName"/>
            </xs:simpleType>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  
  <xs:complexType name="facet">
    <xs:complexContent>
      <xs:extension base="xs:annotated">
        <xs:attribute name="value" use="required"/>
        <xs:attribute name="fixed" type="xs:boolean" use="optional"
                      default="false"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="noFixedFacet">
   <xs:complexContent>
    <xs:restriction base="xs:facet">
     <xs:sequence>
      <xs:element ref="xs:annotation" minOccurs="0"/>
     </xs:sequence>
     <xs:attribute name="fixed" use="prohibited"/>
    </xs:restriction>
   </xs:complexContent>
  </xs:complexType>

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

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

  <xs:complexType name="numFacet">
    <xs:complexContent>
      <xs:restriction base="xs:facet">
       <xs:sequence>
         <xs:element ref="xs:annotation" minOccurs="0"/>
       </xs:sequence>
       <xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="totalDigits" type="xs:numFacet">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/>
    </xs:annotation>
  </xs:element>
  <xs:element name="fractionDigits" type="xs:numFacet">
    <xs:annotation>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>
    </xs:annotation>
  </xs:element>

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

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

</xs:schema>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>