814
|
1 |
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
2 |
|
|
3 |
<xsd:annotation>
|
|
4 |
<xsd:documentation xml:lang="en">
|
|
5 |
Purchase order schema for Example.com.
|
|
6 |
Copyright 2000 Example.com. All rights reserved.
|
|
7 |
</xsd:documentation>
|
|
8 |
</xsd:annotation>
|
|
9 |
|
|
10 |
<xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
|
|
11 |
|
|
12 |
<xsd:element name="comment" type="xsd:string"/>
|
|
13 |
|
|
14 |
<xsd:complexType name="PurchaseOrderType">
|
|
15 |
<xsd:sequence>
|
|
16 |
<xsd:element name="shipTo" type="USAddress"/>
|
|
17 |
<xsd:element name="billTo" type="USAddress"/>
|
|
18 |
<xsd:element ref="comment" minOccurs="0"/>
|
|
19 |
<xsd:element name="items" type="Items"/>
|
|
20 |
</xsd:sequence>
|
|
21 |
<xsd:attribute name="orderDate" type="xsd:date"/>
|
|
22 |
</xsd:complexType>
|
|
23 |
|
|
24 |
<xsd:complexType name="USAddress">
|
|
25 |
<xsd:sequence>
|
|
26 |
<xsd:element name="name" type="xsd:string"/>
|
|
27 |
<xsd:element name="street" type="xsd:string"/>
|
|
28 |
<xsd:element name="city" type="xsd:string"/>
|
|
29 |
<xsd:element name="state" type="xsd:string"/>
|
|
30 |
<xsd:element name="zip" type="xsd:decimal"/>
|
|
31 |
</xsd:sequence>
|
|
32 |
<xsd:attribute name="country" type="xsd:NMTOKEN"
|
|
33 |
fixed="US"/>
|
|
34 |
</xsd:complexType>
|
|
35 |
|
|
36 |
<xsd:complexType name="Items">
|
|
37 |
<xsd:sequence>
|
|
38 |
<xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
|
|
39 |
<xsd:complexType>
|
|
40 |
<xsd:sequence>
|
|
41 |
<xsd:element name="productName" type="xsd:string"/>
|
|
42 |
<xsd:element name="quantity">
|
|
43 |
<xsd:simpleType>
|
|
44 |
<xsd:restriction base="xsd:positiveInteger">
|
|
45 |
<xsd:maxExclusive value="100"/>
|
|
46 |
</xsd:restriction>
|
|
47 |
</xsd:simpleType>
|
|
48 |
</xsd:element>
|
|
49 |
<xsd:element name="USPrice" type="xsd:decimal"/>
|
|
50 |
<xsd:element ref="comment" minOccurs="0"/>
|
|
51 |
<xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
|
|
52 |
</xsd:sequence>
|
|
53 |
<xsd:attribute name="partNum" type="SKU" use="required"/>
|
|
54 |
</xsd:complexType>
|
|
55 |
</xsd:element>
|
|
56 |
</xsd:sequence>
|
|
57 |
</xsd:complexType>
|
|
58 |
|
|
59 |
<!-- Stock Keeping Unit, a code for identifying products -->
|
|
60 |
<xsd:simpleType name="SKU">
|
|
61 |
<xsd:restriction base="xsd:string">
|
|
62 |
<xsd:pattern value="\d{3}-[A-Z]{2}"/>
|
|
63 |
</xsd:restriction>
|
|
64 |
</xsd:simpleType>
|
|
65 |
|
|
66 |
</xsd:schema>
|