<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="schema:Pos_080101_head_elements_of_substitution_groups_001"
    xmlns:ns="schema:Pos_080101_head_elements_of_substitution_groups_001">
  <!-- THE HEAD ELEMENT -->
  <element name="head" type="string"/>
  <!-- SUBSTITUTION ELEMENT OF THE SAME TYPE AS THE HEAD -->
  <element name="member1" type="string" substitutionGroup="ns:head"/>
  <!-- SUBSTITUTION ELEMENT OF A TYPE RESTRICTING THE TYPE OF THE HEAD -->
  <simpleType name="stringEnum">
    <restriction base="string">
      <enumeration value="something"/>
      <enumeration value="else"/>
    </restriction>
  </simpleType>
  <element name="member2" type="ns:stringEnum" substitutionGroup="ns:head"/>
  <!-- SUBSTITUTION ELEMENT OF A TYPE EXTENDING THE TYPE OF THE HEAD -->
  <complexType name="complexEnum">
    <simpleContent>
      <extension base="string">
        <attribute name="foo" type="float"/>
        <attribute name="bar" type="integer"/>
      </extension>
    </simpleContent>
  </complexType>
  <element name="member3" type="ns:complexEnum" substitutionGroup="ns:head"/>
  <!-- TOP LEVEL ELEMENT TO DEMONSTRATE SUBSTITUTION -->
  <element name="ize">
    <complexType>
      <sequence>
        <element ref="ns:head" minOccurs="0" maxOccurs="unbounded"/>
      </sequence>
    </complexType>
  </element>
</schema>