1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
3 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4 xmlns:this="www.example.org/substitutiongroup/complextype/block"
5 targetNamespace="www.example.org/substitutiongroup/complextype/block" blockDefault="extension">
8 <xsd:element name="head" type="this:restrictedType" block="restriction" />
10 <!-- SUBSTITUTABLE PARENT TYPE -->
11 <xsd:complexType name="ParentType">
13 <xsd:element name="foo" minOccurs="0" maxOccurs="unbounded" type="xsd:string" />
14 <xsd:element name="bar" type="xsd:string"/>
18 <xsd:element name="RestrictedTypeElem" type="this:restrictedType" substitutionGroup="this:head"/>
19 <!-- The restricting type is: -->
20 <xsd:complexType name="restrictedType">
22 <xsd:restriction base="this:ParentType">
24 <xsd:element name="foo" minOccurs="1" maxOccurs="unbounded" type="xsd:string"/>
25 <xsd:element name="bar" type="xsd:string"/>