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

<xsd:schema
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:tns="urn:subGroup:types"
   targetNamespace="urn:subGroup:types"
   elementFormDefault='qualified'>

  <xsd:complexType name='baseType'>
    <xsd:sequence>
      <xsd:element name="base" type='xsd:string'/>
      <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name='childType'>
    <xsd:complexContent>
      <xsd:extension base="tns:baseType">
        <xsd:sequence>
          <xsd:element name="child" type='xsd:string'/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:element name="baseElt" type="tns:baseType"/>
  <xsd:element name="childElt" type="tns:childType" substitutionGroup='tns:baseElt'/>

  <!-- Holder type -->
  <xsd:complexType name='holderType'>
    <xsd:sequence>
      <xsd:element ref="tns:baseElt" maxOccurs='unbounded'/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:element name='holder' type='tns:holderType'/>

</xsd:schema>
