Substitution Groups


A looser form of type replacement than subtypes

<element name="Room" type="positiveInteger"/>
<element name="Staff" type="Staff_type">
  ...
  <element ref="Room" minOccurs="1">
  ...
</element>
  ...
<simpleType name="B_Room" substitutionGroup="Room">
  <restriction base="string">
    <xsd:pattern value="[A-Z][0-9]+"/>
  </restriction>
</simpleType>

makes the following fragment legal:

  <Staff>...<B_Room>M379</B_Room>...<Staff>