2 <xsd:schema xmlns:
xsd=
"http://www.w3.org/2001/XMLSchema">
3 <xsd:element name=
"comment" type=
"xsd:string"/>
4 <!-- Stock Keeping Unit, a code for identifying products -->
5 <xsd:simpleType name=
"SKU">
6 <xsd:restriction base=
"xsd:string">
7 <xsd:pattern value=
"\d{3}-[A-Z]{2}"/>
10 <xsd:element name=
"Item">
13 <xsd:element name=
"productName" type=
"xsd:string"/>
14 <xsd:element name=
"quantity">
16 <xsd:restriction base=
"xsd:positiveInteger">
17 <xsd:maxExclusive value=
"100"/>
21 <xsd:element name=
"USPrice" type=
"xsd:decimal"/>
22 <xsd:element ref=
"comment" minOccurs=
"0"/>
23 <xsd:element name=
"shipDate" type=
"xsd:date" minOccurs=
"0"/>
25 <!-- attributeGroup replaces individual declarations -->
26 <xsd:attributeGroup ref=
"ItemDelivery"/>
29 <xsd:attributeGroup name=
"ItemDelivery">
30 <xsd:attribute name=
"partNum" type=
"SKU" use=
"required"/>
31 <xsd:attribute name=
"weightKg" type=
"xsd:decimal"/>
32 <xsd:attribute name=
"shipBy">
34 <xsd:restriction base=
"xsd:string">
35 <xsd:enumeration value=
"air"/>
36 <xsd:enumeration value=
"land"/>
37 <xsd:enumeration value=
"any"/>