title: Splitting XSD scheme into several files
body: <p>I try to build a following set of XSD schemes for computers game's map data : </p>
  
  <ol>
  <li>CreatureDefinitionsSchema.xsd  </li>
  <li>CreatureSchema.xsd</li>
  <li>GoalList.xsd </li>
  <li>LightScheme.xsd  </li>
  <li>RoomScheme.xsd    </li>
  <li>SeatScheme.xsd </li>
  <li>TrapScheme.xsd</li>
  </ol>
  
  <p>The central is  MapDefinitionSchema.xsd  schema, which ought to reference other schemas.
  I havent' come across such example but general idea is to create complementary set </p>
  
  <ol>
  <li>CreatureDefinitionsSchema.xml  </li>
  <li>CreatureSchema.xml</li>
  <li>GoalList.xml </li>
  <li>LightScheme.xml  </li>
  <li>RoomScheme.xml    </li>
  <li>SeatScheme.xml </li>
  <li>TrapScheme.xml</li>
  </ol>
  
  <p>And use it in MapDefinition.xml with xsd:import .
  What I want is to be able to validate MapDefinition.xml against MapDefinitionScheme.xsd
  and other xml files against their *.xsd counterparts. </p>
  
  <p>However I see I manage to xs:import types from other xsd (not what I want)  . What I want is more like : </p>
  
  <pre><code>&lt;xs:element name="GameMap"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="MapSizeX"&gt;  &lt;/xs:element &gt;
              &lt;xs:element name="MapSizeY"&gt;  &lt;/xs:element &gt;                
              &lt;xs:include xmlns:xi="http://www.w3.org/2001/XInclude" href="SeatScheme.xsd" /&gt;
          &lt;/xs:sequence&gt;           
  
      &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>, but I get </p>
  
  <blockquote>
    <blockquote>
      <p>Engine name: Xerces
      Severity: error
      Description: s4s-elt-must-match.1: The content of 'sequence' must match (annotation?, (element | group | choice | sequence | any)*). A problem was found starting at: include.
      Start location: 9:18
      End location: 9:28 &lt;&lt; </p>
    </blockquote>
  </blockquote>
  
  <p>Seems I cannot put include those elements at random. </p>
  
  <blockquote>
    <p>My SeatScheme.xsd : </p>
    
    <p> </p>
  
  <pre><code>&lt;xs:element name="SeatList" type="Seat"/&gt;        
      &lt;xs:complexType name="Seat"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="color" type="xs:string"/&gt;
          &lt;xs:element name="faction" type="xs:string"/&gt;
          &lt;xs:element name="startingX" type="xs:integer"/&gt;
          &lt;xs:element name="startingY" type="xs:integer"/&gt;
          &lt;xs:element name="colorR" type="xs:decimal"/&gt;            
          &lt;xs:element name="colorG" type="xs:decimal"/&gt;
          &lt;xs:element name="colorB" type="xs:decimal"/&gt;            
      &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt; &lt;/xs:schema&gt;
  </code></pre>
  </blockquote>
  
  <p>Is that ever doable , not operating on types but on elements  ? </p>