51fa56b9 |
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/mod1" |
5 | xmlns:A="www.example.org/type/substitution/mod2" |
6 | targetNamespace="www.example.org/type/substitution/mod1" blockDefault="extension"> |
7 | <xsd:import namespace="www.example.org/type/substitution/mod2" schemaLocation="type_substitution_mod2.xsd"/> |
8 | |
9 | <!-- SUBSTITUTABLE PARENT TYPE --> |
10 | <!-- type substitutiongroup generated, because has elemet declaration --> |
11 | <xsd:complexType name="ParentType" abstract="true" block="restriction extension"> |
12 | <xsd:sequence> |
13 | <xsd:element name="foo" minOccurs="0" maxOccurs="unbounded" type="xsd:string" /> |
14 | <xsd:element name="bar" type="xsd:string"/> |
15 | </xsd:sequence> |
16 | </xsd:complexType> |
17 | |
18 | <xsd:element name="RestrictedTypeElem" type="tys:restrictedType"/> |
19 | <!-- type substitutiongroup generated, because has elemet declaration --> |
20 | <xsd:complexType name="restrictedType"> |
21 | <xsd:complexContent> |
22 | <xsd:restriction base="tys:ParentType"> |
23 | <xsd:sequence> |
24 | <xsd:element name="foo" minOccurs="1" maxOccurs="unbounded" type="xsd:string"/> |
25 | <xsd:element name="bar" type="xsd:string"/> |
26 | </xsd:sequence> |
27 | </xsd:restriction> |
28 | </xsd:complexContent> |
29 | </xsd:complexType> |
30 | |
31 | <!-- type substitutiongroup generated, because the parent has elemet declaration --> |
32 | <xsd:complexType name="restrictedType2"> |
33 | <xsd:complexContent> |
34 | <xsd:restriction base="tys:restrictedType"> |
35 | <xsd:sequence> |
36 | <xsd:element name="foo" minOccurs="2" maxOccurs="unbounded" type="xsd:string"/> |
37 | <xsd:element name="bar" type="xsd:string"/> |
38 | </xsd:sequence> |
39 | </xsd:restriction> |
40 | </xsd:complexContent> |
41 | </xsd:complexType> |
42 | |
43 | <!-- Added to restrictedtype_derivations --> |
44 | <xsd:complexType name="restrictedType2.1"> |
45 | <xsd:complexContent> |
46 | <xsd:restriction base="tys:restrictedType"> |
47 | <xsd:sequence> |
48 | <xsd:element name="foo" minOccurs="2" maxOccurs="5" type="xsd:string"/> |
49 | <xsd:element name="bar" type="xsd:string"/> |
50 | </xsd:sequence> |
51 | </xsd:restriction> |
52 | </xsd:complexContent> |
53 | </xsd:complexType> |
54 | |
55 | <!-- No type substitutiongroup generated, because the parent lacks elemet declaration --> |
56 | <xsd:complexType name="restrictedType3"> |
57 | <xsd:complexContent> |
58 | <xsd:restriction base="tys:restrictedType2"> |
59 | <xsd:sequence> |
60 | <xsd:element name="foo" minOccurs="3" maxOccurs="unbounded" type="xsd:string"/> |
61 | <xsd:element name="bar" type="xsd:string"/> |
62 | </xsd:sequence> |
63 | </xsd:restriction> |
64 | </xsd:complexContent> |
65 | </xsd:complexType> |
66 | |
67 | <xsd:element name="extendedElement" type="A:extendedType"/> |
68 | |
69 | </xsd:schema> |