3abe9331 |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
3 | xmlns="http://www.example.org/complex-restriction-with-use" |
4 | targetNamespace="http://www.example.org/complex-restriction-with-use"> |
5 | <!-- The base type is: --> |
6 | <xs:complexType name="PurchaseOrderType"> |
7 | <xs:sequence> |
8 | <xs:element name="shipTo" type="xs:string"/> |
9 | <xs:element name="billTo" type="xs:string" minOccurs="0"/> |
10 | <xs:element name="items" type="xs:string"/> |
11 | </xs:sequence> |
12 | <xs:attribute name="finishDate" type="xs:date"/> |
13 | <xs:attribute name="shipDate" type="xs:date"/> |
14 | <xs:attribute name="orderDate" type="xs:date"/> |
15 | </xs:complexType> |
16 | |
17 | <!-- The restricting type is: --> |
18 | <xs:complexType name="RestrictedPurchaseOrderType"> |
19 | <xs:complexContent> |
20 | <xs:restriction base="PurchaseOrderType"> |
21 | <xs:sequence> |
22 | <xs:element name="shipTo" type="xs:string"/> |
23 | <xs:element name="billTo" type="xs:string" minOccurs="1"/> |
24 | <xs:element name="items" type="xs:string"/> |
25 | </xs:sequence> |
26 | <xs:attribute name="finishDate" type="xs:date"/> |
27 | <xs:attribute name="shipDate" type="xs:date" use="required" /> |
28 | <xs:attribute name="orderDate" type="xs:date" use="prohibited" /> |
29 | </xs:restriction> |
30 | </xs:complexContent> |
31 | </xs:complexType> |
32 | |
33 | <xs:element name="testsuite" type="testsuite"/> |
34 | |
35 | <xs:complexType name="testsuite"> |
36 | <xs:sequence> |
37 | <xs:element name="properties"> |
38 | <xs:complexType> |
39 | </xs:complexType> |
40 | </xs:element> |
41 | |
42 | </xs:sequence> |
43 | <xs:attribute name="time" type="xs:decimal" use="optional"> |
44 | </xs:attribute> |
45 | </xs:complexType> |
46 | |
47 | |
48 | |
49 | <xs:element name="testsuites"> |
50 | <xs:complexType> |
51 | <xs:sequence> |
52 | <xs:element name="testsuite" > |
53 | <xs:complexType> |
54 | <xs:complexContent> |
55 | <xs:restriction base="testsuite"> |
56 | <xs:sequence> |
57 | <xs:element name="properties"> |
58 | <xs:complexType> |
59 | </xs:complexType> |
60 | </xs:element> |
61 | </xs:sequence> |
62 | <xs:attribute name="time" type="xs:decimal" use="required"/> |
63 | </xs:restriction> |
64 | </xs:complexContent> |
65 | </xs:complexType> |
66 | </xs:element> |
67 | </xs:sequence> |
68 | </xs:complexType> |
69 | </xs:element> |
70 | |
71 | </xs:schema> |