<?xml version="1.0"?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 19990506//EN" 
  "http://www.w3.org/1999/05/06-xmlschema-1/structures.dtd">
 
<schema xmlns="http://www.w3.org/1999/05/06-xmlschema-1/structures.xsd"
 name="http://www.w3.org/1999/05/06-xmlschema-1/structures.xsd" version="0.4">
 
                    
<!-- ################################################ -->
  <!-- ################################################ -->
<!-- The datatype element type, and all of its members are defined
     in XML Schema: Part 2: Datatypes -->
  
  <include
   schemaName="http://www.w3.org/1999/05/06-xmlschema-2/datatypes.xsd">
    </include>
   
<!-- ################################################ -->
  <!-- ################################################ -->
<!-- The NCName datatype is widely used for the names of components -->
  
  <datatype name="NCName"><basetype name="NMTOKEN"/> </datatype>
  
<!-- The public datatype is used for entities and notations -->
  
  <datatype name="public"><basetype name="string"/> </datatype>
  
<!-- ################################################ -->
  <!-- ################################################ -->
<!-- schema element type -->
  
  <elementType name="schema">
    <sequence> 
      <elementTypeRef name="import" minOccur="0"/> 
      <elementTypeRef name="export" minOccur="0"/> 
      <elementTypeRef name="include" minOccur="0"/> 
      <choice minOccur="0"> 
        <elementTypeRef name="datatype"/> 
        <elementTypeRef name="archetype"/> 
        <elementTypeRef name="elementType"/> 
        <elementTypeRef name="attrDecl"/> 
        <elementTypeRef name="attrGroup"/> 
        <elementTypeRef name="modelGroup"/> 
        <elementTypeRef name="textEntity"/> 
        <elementTypeRef name="externalEntity"/> 
        <elementTypeRef name="unparsedEntity"/> 
        <elementTypeRef name="notation"/> 
      </choice> 
    </sequence> 
    <attrDecl name="name"> 
      <datatypeRef name="uri"> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="version"> 
      <datatypeRef name="string"> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="xmlns"> 
      <datatypeRef name="uri"> 
        <default>http://www.w3.org/1999/05/06-xmlschema-1/structures.xsd</default> 
      </datatypeRef> 
    </attrDecl>
    <attrGroupRef name="model"/> 
  </elementType>

  <attrGroup name="model"> 
    <attrDecl name="model"> 
      <datatypeRef name="NCName"> 
        <default>closed</default> 
      </datatypeRef> 
    </attrDecl> 
  </attrGroup>

  <!-- ################################################ -->
  <!-- import, export and include -->
<!-- The import, export and include elements all include the 
     restrictions attribute group, whose attributes can be used 
     to enable or disable import and export restrictions.
     Within import and include elements, references to the
     components of foreign schemas control their importation 
     or inclusion, respectively.  -->
  <!-- ################################################ -->
<!-- import element type  -->
  
  <elementType name="import">
    <choice> 
      <elementTypeRef name="datatypeRef"/> 
      <elementTypeRef name="archetypeRef"/> 
      <elementTypeRef name="elementTypeRef"/> 
      <elementTypeRef name="attrGroupRef"/> 
      <elementTypeRef name="modelGroupRef"/> 
      <elementTypeRef name="entityRef"/> 
      <elementTypeRef name="notationRef"/> 
    </choice> 
    <attrDecl name="schemaAbbrev" required="true"> 
      <datatypeRef name="NCName"> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="schemaName" required="true"> 
      <datatypeRef name="uri"> 
      </datatypeRef> 
    </attrDecl>
    <attrGroupRef name="restrictions"/> 
  </elementType>

<!-- export element type  --> 
  <elementType name="export">
    <empty/>
    <attrGroupRef name="restrictions"/> 
  </elementType>

<!-- include element type  --> 
  <elementType name="include">
    <choice> 
      <elementTypeRef name="datatypeRef"/> 
      <elementTypeRef name="archetypeRef"/> 
      <elementTypeRef name="elementTypeRef"/> 
      <elementTypeRef name="attrGroupRef"/> 
      <elementTypeRef name="modelGroupRef"/> 
      <elementTypeRef name="entityRef"/> 
      <elementTypeRef name="notationRef"/> 
    </choice>
    <attrGroupRef name="restrictions"/> 
  </elementType>

  <attrGroup name="restrictions"> 
    <attrDecl name="datatypes"> 
      <datatypeRef name="boolean"> 
        <default>true</default> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="archetypes"> 
      <datatypeRef name="boolean"> 
        <default>true</default> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="elementTypes"> 
      <datatypeRef name="boolean"> 
        <default>true</default> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="attrGroups"> 
      <datatypeRef name="boolean"> 
        <default>true</default> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="modelGroups"> 
      <datatypeRef name="boolean"> 
        <default>true</default> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="entities"> 
      <datatypeRef name="boolean"> 
        <default>true</default> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="notations"> 
      <datatypeRef name="boolean"> 
        <default>true</default> 
      </datatypeRef> 
    </attrDecl> 
  </attrGroup>

  <!-- ################################################ -->
  <!-- Fundamental archetypes needed to build the schema -->
<!-- Two fundamental archetypes (components and references) 
     are used hereafter to build the schema. -->
  <!-- A component specifies its own name and its export control. -->
<!-- ################################################ -->
  <!-- component archetype  --> 
  <archetype name="component" model="refinable">
    <empty/> 
    <attrDecl name="name"> 
      <datatypeRef name="NCName"> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="export"> 
      <datatypeRef name="boolean"> 
      </datatypeRef> 
    </attrDecl> 
  </archetype>
 
 
<!-- A reference specifies the name of a component, and 
     optionally a schemaAbbrev or schemaName attribute.  -->
  <!-- reference archetype  --> 
  <archetype name="reference" model="refinable">
    <empty/> 
    <attrDecl name="name" required="true"> 
      <datatypeRef name="NCName"> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="schemaAbbrev"> 
      <datatypeRef name="NCName"> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="schemaName"> 
      <datatypeRef name="uri"> 
      </datatypeRef> 
    </attrDecl> 
  </archetype>


  <!-- ################################################ -->
  <!-- ######### COMPONENTS ########################### -->
<!-- ################################################ -->
  <!-- The datatype definition element type is defined in  
       XML Schema Part 2: Datatypes.  -->
  <!-- A datatypeRef element type is based on the reference archetype. 
     It provides for specification of datatype qualification 
     through the ordered and unordered facets and through the 
     optional default and fixed elements. The content model  
     is tentative, pending future coordination work between the 
     is tentative, pending further coordination between the 
     schema definition and datatype definition specifications. -->
  <!-- datatypeRef element type  --> 
  <archetype name="datatypeRef">
    <refines> <archetypeRef name="reference"/> </refines>
    <all> 
      <all> 
        <modelGroupRef name="ordered"/> 
        <modelGroupRef name="unordered"/> 
      </all> 
      <choice minOccur="0" maxOccur="1"> 
        <elementTypeRef name="default"/> 
        <elementTypeRef name="fixed"/> 
      </choice> 
    </all> 
  </archetype>

<!-- datatypeRef element type  --> 
  <elementType name="datatypeRef">
    <archetypeRef name="datatypeRef"/> 
  </elementType>

<!-- default element type  --> 
  <elementType name="default">
    <datatypeRef name="string"> 
    </datatypeRef> 
  </elementType>

<!-- fixed element type  --> 
  <elementType name="fixed">
    <datatypeRef name="string"> 
    </datatypeRef> 
  </elementType>


<!-- The archetype element type is based on the component archetype. 
     It may include a refines element that specifies the archetype 
     that is is based on, and either a datatypeRef or a model, 
     followed by any number of attrDecl and attrGroupRef elements.  -->
  <!-- ################################################ -->
<!-- ################################################ -->
  <!-- archetype element type --> 
  <elementType name="archetype">
    <refines> <archetypeRef name="component"/> </refines>
    <sequence> 
      <elementTypeRef name="refines"/> 
      <choice> 
        <elementTypeRef name="datatypeRef"/> 
        <modelGroupRef name="model"/> 
      </choice> 
      <elementTypeRef name="attrDecl"/> 
      <elementTypeRef name="attrGroupRef"/> 
    </sequence>
    <attrGroupRef name="model"/> 
  </elementType>
  
<!-- The model model group, and the modelElt model group that 
     it references, are reusable content model fragments. 
     The model model group is used in the definition of the 
     archetype, elementType and modelGroup element types. 
     Its members are defined later. -->
  
  <modelGroup name="model"> 
    <choice> 
      <elementTypeRef name="any"/> 
      <elementTypeRef name="empty"/> 
      <elementTypeRef name="mixed"/> 
      <modelGroupRef name="modelElt"/> 
    </choice> 
  </modelGroup>

  <modelGroup name="modelElt"> 
    <choice> 
      <elementTypeRef name="all"/> 
      <elementTypeRef name="choice"/> 
      <elementTypeRef name="elementType"/> 
      <elementTypeRef name="elementTypeRef"/> 
      <elementTypeRef name="sequence"/> 
      <elementTypeRef name="modelGroupRef"/> 
    </choice> 
  </modelGroup>
  

<!-- The archetypeRef element type is based on the reference archetype.  -->
  <!-- archetypeRef element type --> 
  <elementType name="archetypeRef">
    <archetypeRef name="reference"/> 
  </elementType>


<!-- The elementType element type is based in the component archetype. 
     It is almost identical to the archetype element type except 
     that it additionally provides for immediate specification of 
     an archetypeRef upon which its definition is based.  -->
  <!-- The elementTypeRef is based upon the reference archetype. 
     It additionally provides for specification of minOccurs 
     and maxOccurs attributes used when defining a content model.  -->
  <!-- ################################################ -->
<!-- ################################################ -->
  <!-- elementType element type --> 
  <elementType name="elementType">
    <refines> <archetypeRef name="component"/> </refines>
    <sequence> 
      <elementTypeRef name="refines"/> 
      <choice> 
        <elementTypeRef name="datatypeRef"/> 
        <elementTypeRef name="archetypeRef"/> 
        <modelGroupRef name="model"/> 
      </choice> 
      <elementTypeRef name="attrDecl"/> 
      <elementTypeRef name="attrGroupRef"/> 
    </sequence>
    <attrGroupRef name="model"/> 
  </elementType>


<!-- elementTypeRef element type --> 
  <elementType name="elementTypeRef">
    <archetypeRef name="reference"/>
    <attrGroupRef name="occurrence"/> 
  </elementType>

  <attrGroup name="occurrence"> 
    <attrDecl name="minOccur"> 
      <datatypeRef name="integer"> 
        <default>1</default> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="maxOccur"> 
      <datatypeRef name="integer"> 
        <default>1</default> 
      </datatypeRef> 
    </attrDecl> 
  </attrGroup>

<!-- The modelGroup element type is based on the component archetype. 
     It must contain elements of the model model group, and it 
     may specify its model and occurrence attributes. -->
  <!-- The modelGroupRef element type is based on the reference archetype. -->
  <!-- ################################################ -->
<!-- ################################################ -->
  <!-- modelGroup element type --> 
  <elementType name="modelGroup">
    <refines> <archetypeRef name="component"/> </refines>
    <modelGroupRef name="model"/>
    <attrGroupRef name="model"/>
    <attrGroupRef name="occurrence"/> 
  </elementType>

<!-- modelGroupRef element type --> 
  <elementType name="modelGroupRef">
    <archetypeRef name="reference"/>
    <attrGroupRef name="occurrence"/> 
  </elementType>


<!-- The modelGroup element type is based in the component archetype. 
     It provides for one or more attrDecl and attrGroupRef elements. -->
  <!-- The attrGroupRef element type is based on the reference archetype.  -->
  <!-- ################################################ -->
<!-- ################################################ -->
  <!-- attrGroup element type --> 
  <elementType name="attrGroup">
    <refines> <archetypeRef name="component"/> </refines>
    <choice minOccur="1" maxOccur="*"> 
      <elementTypeRef name="attrDecl"/> 
      <elementTypeRef name="attrGroupRef"/> 
    </choice>
    <attrGroupRef name="model"/> 
  </elementType>

<!-- attrGroupRef element type --> 
  <elementType name="attrGroupRef">
    <archetypeRef name="reference"/> 
  </elementType>


<!-- The textEntity element type is based on the component archetype. 
     It provides for string content to specify the entity value.  -->
  <!-- ################################################ -->
<!-- ################################################ -->
  <!-- entities -->
<!-- textEntity element type --> 
  <elementType name="textEntity">
    <datatypeRef name="string"> 
    </datatypeRef> 
  </elementType>

<!-- The externalEntity and unparsedEntity element types are 
     based on the component archetype. They provide for specification 
     of a uri, an optional public identifier, and a notation attribute.  -->
  <!-- externalEntity element type --> 
  <elementType name="externalEntity">
    <refines> <archetypeRef name="component"/> </refines>
    <empty/>
    <attrGroupRef name="external"/> 
  </elementType>

<!-- unparsedEntity element type --> 
  <elementType name="unparsedEntity">
    <refines> <archetypeRef name="component"/> </refines>
    <empty/>
    <attrGroupRef name="external"/> 
  </elementType>

  <attrGroup name="external"> 
    <attrDecl name="system" required="true"> 
      <datatypeRef name="uri"> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="public"> 
      <datatypeRef name="public"> 
      </datatypeRef> 
    </attrDecl> 
    <attrDecl name="notation" required="true"> 
      <datatypeRef name="NOTATION"> 
        <default>XML</default> 
      </datatypeRef> 
    </attrDecl> 
  </attrGroup>

<!-- The entityRef elementType is based on the reference archetype. 
 -->
  <!-- entityRef element type --> 
  <elementType name="entityRef">
    <archetypeRef name="reference"/> 
  </elementType>


<!-- The notation element type is based on the component archetype. 
     The notationRef element type is based in the reference archetype. -->
  <!-- notation element type --> 
  <elementType name="notation">
    <refines> <archetypeRef name="component"/> </refines>
    <empty/>
    <attrGroupRef name="external"/> 
  </elementType>

<!-- notationRef element type --> 
  <elementType name="notationRef">
    <archetypeRef name="reference"/> 
  </elementType>



  <!-- ################################################ -->
  <!-- ################################################ -->
<!-- Content model atoms -->
  
  <elementType name="any">
    <empty/> 
  </elementType>

  <elementType name="empty">
    <empty/> 
  </elementType>

  <elementType name="mixed">
    <choice minOccur="0" maxOccur="*"> 
      <elementTypeRef name="elementTypeRef"/> 
      <elementTypeRef name="elementType"/> 
    </choice> 
  </elementType>



  <!-- ################################################ -->
  <!-- ################################################ -->
<!-- Element groups -->
  
  <archetype name="compositor">
    <choice minOccur="2" maxOccur="*"> 
      <modelGroupRef name="modelElt"/> 
      <elementTypeRef name="elementType"/> 
    </choice>
    <attrGroupRef name="occurrence"/> 
  </archetype>

  <elementType name="all">
    <archetypeRef name="compositor"/> 
  </elementType>

  <elementType name="choice">
    <archetypeRef name="compositor"/> 
  </elementType>

  <elementType name="sequence">
    <archetypeRef name="compositor"/> 
  </elementType>



  <!-- ################################################ -->
  <!-- ################################################ -->
<!-- notations for use within XML Schema schemas  -->
  <notation name="XMLSchemaStructures" public="structures"
            system="http://www.w3.org/1999/05/06-xmlschema-1/structures.xsd"/> 
  <notation name="XML" public="REC-xml-19980210"
            system="http://www.w3.org/TR/1998/REC-xml-19980210"/> 
</schema>
