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:tys="www.example.org/type/substitution/abstract/block"
5 targetNamespace="www.example.org/type/substitution/abstract/block" blockDefault="extension">
8 <xsd:element name="head" type="tys:ParentType"/>
10 <!-- SUBSTITUTABLE PARENT TYPE -->
11 <!-- type substitutiongroup generated, because has elemet declaration -->
12 <xsd:complexType name="ParentType" abstract="true" block="restriction extension">
14 <xsd:element name="foo" minOccurs="0" maxOccurs="unbounded" type="xsd:string" />
15 <xsd:element name="bar" type="xsd:string"/>
19 <xsd:element name="RestrictedTypeElem" type="tys:restrictedType"/>
20 <!-- type substitutiongroup generated, because has elemet declaration -->
21 <xsd:complexType name="restrictedType">
23 <xsd:restriction base="tys:ParentType">
25 <xsd:element name="foo" minOccurs="1" maxOccurs="unbounded" type="xsd:string"/>
26 <xsd:element name="bar" type="xsd:string"/>
32 <!-- type substitutiongroup generated, because the parent has elemet declaration -->
33 <xsd:complexType name="restrictedType2">
35 <xsd:restriction base="tys:restrictedType">
37 <xsd:element name="foo" minOccurs="2" maxOccurs="unbounded" type="xsd:string"/>
38 <xsd:element name="bar" type="xsd:string"/>
44 <!-- Added to restrictedtype_derivations -->
45 <xsd:complexType name="restrictedType2.1">
47 <xsd:restriction base="tys:restrictedType">
49 <xsd:element name="foo" minOccurs="2" maxOccurs="5" type="xsd:string"/>
50 <xsd:element name="bar" type="xsd:string"/>
56 <!-- No type substitutiongroup generated, because the parent lacks elemet declaration -->
57 <xsd:complexType name="restrictedType3">
59 <xsd:restriction base="tys:restrictedType2">
61 <xsd:element name="foo" minOccurs="3" maxOccurs="unbounded" type="xsd:string"/>
62 <xsd:element name="bar" type="xsd:string"/>
68 <xsd:element name="extendedElement" type="tys:extendedType"/>
69 <xsd:complexType name="extendedType" block="restriction">
71 <xsd:extension base="tys:ParentType">
74 <xsd:attribute name="attr1" type="string" />
79 <xsd:complexType name="restrictedExtendedType">
81 <xsd:restriction base="tys:extendedType">
83 <xsd:element name="foo" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/>
84 <xsd:element name="bar" type="xsd:string"/>
86 <xsd:attribute name="attr1" type="string" use="prohibited" />