Titan Core Initial Contribution
[deliverable/titan.core.git] / regression_test / XML / XmlWorkflow / XmlTest_xsds / po.xsd
1 <!--
2 Copyright (c) 2000-2014 Ericsson Telecom AB
3
4 All rights reserved. This program and the accompanying materials
5 are made available under the terms of the Eclipse Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/epl-v10.html
8 -->
9 <xsd:schema
10 xmlns="http://www.XmlTest.org/po"
11 targetNamespace="http://www.XmlTest.org/po"
12 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
13
14 <xsd:annotation>
15 <xsd:documentation xml:lang="en">
16 Purchase order schema for Example.com.
17 Copyright 2000 Example.com. All rights reserved.
18 </xsd:documentation>
19 </xsd:annotation>
20
21 <xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
22
23 <xsd:element name="comment" type="xsd:string"/>
24
25 <xsd:complexType name="PurchaseOrderType">
26 <xsd:sequence>
27 <xsd:element name="shipTo" type="USAddress"/>
28 <xsd:element name="billTo" type="USAddress"/>
29 <xsd:element ref="comment" minOccurs="0"/>
30 <xsd:element name="items" type="Items"/>
31 </xsd:sequence>
32 <xsd:attribute name="orderDate" type="xsd:date"/>
33 </xsd:complexType>
34
35 <xsd:complexType name="USAddress">
36 <xsd:sequence>
37 <xsd:element name="name" type="xsd:string"/>
38 <xsd:element name="street" type="xsd:string"/>
39 <xsd:element name="city" type="xsd:string"/>
40 <xsd:element name="state" type="xsd:string"/>
41 <xsd:element name="zip" type="xsd:decimal"/>
42 </xsd:sequence>
43 <xsd:attribute name="country" type="xsd:NMTOKEN"
44 fixed="US"/>
45 </xsd:complexType>
46
47 <xsd:complexType name="Items">
48 <xsd:sequence>
49 <xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
50 <xsd:complexType>
51 <xsd:sequence>
52 <xsd:element name="productName" type="xsd:string"/>
53 <xsd:element name="quantity">
54 <xsd:simpleType>
55 <xsd:restriction base="xsd:positiveInteger">
56 <xsd:maxExclusive value="100"/>
57 </xsd:restriction>
58 </xsd:simpleType>
59 </xsd:element>
60 <xsd:element name="USPrice" type="xsd:decimal"/>
61 <xsd:element ref="comment" minOccurs="0"/>
62 <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
63 </xsd:sequence>
64 <xsd:attribute name="partNum" type="SKU" use="required"/>
65 </xsd:complexType>
66 </xsd:element>
67 </xsd:sequence>
68 </xsd:complexType>
69
70 <!-- Stock Keeping Unit, a code for identifying products -->
71 <xsd:simpleType name="SKU">
72 <xsd:restriction base="xsd:string">
73 <xsd:pattern value="\d{3}-[A-Z]{2}"/>
74 </xsd:restriction>
75 </xsd:simpleType>
76
77 </xsd:schema>
This page took 0.039764 seconds and 6 git commands to generate.