summaryrefslogtreecommitdiffstats
path: root/sca-cpp/tags/cpp-stable-20060304/sdo/runtime/core/test/Order.xsd
blob: 1ece31ac0bfe2d9c6af76d805be8aebfe462a7f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ord="orderNS" xmlns:cust="customerNS" targetNamespace="orderNS">

<include schemaLocation="./Customer.xsd"/>

<element name="order" type="ord:OrderType">
    <complexType name="OrderType">
      <sequence>
        <element name="orderId" type="ID"/>
        <element name="status" type="ord:OrderStatus"/>
        <element name="item" maxOccurs="unbounded" ref="ord:item"/>
        <element ref="cust:customer"/>
      </sequence>
    </complexType>
  </element>

  <element name="item">
    <complexType>
      <element name="itemId" type="integer"/>
      <element name="description" type="string"/>
      <element name="price" type="string"/>
      <element name="quantity" type="integer"/>
      <element name="warehouseId" type="integer"/>
    </complexType>
  </element>

  <simpleType name="OrderStatus">
    <restriction base="string">
      <enumeration value="NONE"/>
      <enumeration value="RECEIVED"/>
      <enumeration value="INVOICED"/>
      <enumeration value="DISPATCHED"/>
      <enumeration value="COMPLETED"/>
      <enumeration value="CANCELLED"/>
    </restriction>
  </simpleType>   
     
</schema>