Debian Codegraph @

tests/po-scd/src/main/resources/purchaseorder.xsd

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