| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!-- Schema test for invalid models: UPA violations with a substitution group head and element. --> |
| 3 |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
| 4 |
|
| 5 |
<xs:element type="xs:int" name="a"/> |
| 6 |
<xs:element type="xs:int" name="b" substitutionGroup="a" /> |
| 7 |
|
| 8 |
<xs:complexType name="wrong_type1"> |
| 9 |
<xs:all> |
| 10 |
<xs:element ref="a"/> |
| 11 |
<xs:element ref="b"/> |
| 12 |
</xs:all> |
| 13 |
</xs:complexType> |
| 14 |
|
| 15 |
<xs:complexType name="wrong_type2"> |
| 16 |
<xs:all> |
| 17 |
<xs:element ref="b"/> |
| 18 |
<xs:element ref="a"/> |
| 19 |
</xs:all> |
| 20 |
</xs:complexType> |
| 21 |
|
| 22 |
<xs:complexType name="wrong_type3"> |
| 23 |
<xs:choice> |
| 24 |
<xs:element ref="a"/> |
| 25 |
<xs:element ref="b"/> |
| 26 |
</xs:choice> |
| 27 |
</xs:complexType> |
| 28 |
|
| 29 |
<xs:complexType name="good_type1"> |
| 30 |
<xs:sequence> |
| 31 |
<xs:element ref="a"/> |
| 32 |
<xs:element ref="b"/> |
| 33 |
</xs:sequence> |
| 34 |
</xs:complexType> |
| 35 |
|
| 36 |
<xs:complexType name="wrong_type4"> |
| 37 |
<xs:sequence> |
| 38 |
<xs:element ref="a" maxOccurs="unbounded"/> |
| 39 |
<xs:element ref="b"/> |
| 40 |
</xs:sequence> |
| 41 |
</xs:complexType> |
| 42 |
|
| 43 |
</xs:schema> |