|
1 | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
2 | | -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
3 | | - |
4 | | - <xs:simpleType name="stringtype"> |
5 | | - <xs:restriction base="xs:string"/> |
6 | | - </xs:simpleType> |
7 | | - |
8 | | - <xs:simpleType name="inttype"> |
9 | | - <xs:restriction base="xs:integer"/> |
10 | | - </xs:simpleType> |
11 | | - |
12 | | - <xs:simpleType name="dectype"> |
13 | | - <xs:restriction base="xs:decimal"/> |
14 | | - </xs:simpleType> |
15 | | - |
| 2 | +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| 3 | + xmlns:bt="http://www.cre.fr/xml2db/base_types.xsd"> |
| 4 | + <xs:import schemaLocation="base_types.xsd" |
| 5 | + namespace="http://www.cre.fr/xml2db/base_types.xsd" /> |
16 | 6 | <xs:complexType name="companyIdType"> |
17 | 7 | <xs:choice> |
18 | | - <xs:element name="ace" type="stringtype"/> |
19 | | - <xs:element name="bic" type="stringtype"/> |
20 | | - <xs:element name="lei" type="stringtype"/> |
| 8 | + <xs:element name="ace" type="bt:stringtype"/> |
| 9 | + <xs:element name="bic" type="bt:stringtype"/> |
| 10 | + <xs:element name="lei" type="bt:stringtype"/> |
21 | 11 | </xs:choice> |
22 | 12 | </xs:complexType> |
23 | 13 |
|
24 | 14 | <xs:simpleType name="ZipCodeType-base"> |
25 | | - <xs:restriction base="stringtype"> |
| 15 | + <xs:restriction base="bt:stringtype"> |
26 | 16 | <xs:maxLength value="10"/> |
27 | 17 | </xs:restriction> |
28 | 18 | </xs:simpleType> |
|
37 | 27 |
|
38 | 28 | <xs:complexType name="contacttype"> |
39 | 29 | <xs:sequence> |
40 | | - <xs:element name="name" type="stringtype"/> |
41 | | - <xs:element name="address" type="stringtype"/> |
42 | | - <xs:element name="city" type="stringtype"/> |
| 30 | + <xs:element name="name" type="bt:stringtype"/> |
| 31 | + <xs:element name="address" type="bt:stringtype"/> |
| 32 | + <xs:element name="city" type="bt:stringtype"/> |
43 | 33 | <xs:element name="zip" type="ZipCodeType"/> |
44 | | - <xs:element name="country" type="stringtype"/> |
45 | | - <xs:element name="phoneNumber" type="stringtype" minOccurs="0" maxOccurs="unbounded"/> |
| 34 | + <xs:element name="country" type="bt:stringtype"/> |
| 35 | + <xs:element name="phoneNumber" type="bt:stringtype" minOccurs="0" maxOccurs="unbounded"/> |
46 | 36 | <xs:element name="companyId" type="companyIdType" minOccurs="0" maxOccurs="1"/> |
47 | 37 | </xs:sequence> |
48 | 38 | </xs:complexType> |
49 | 39 |
|
50 | 40 | <xs:complexType name="producttype"> |
51 | 41 | <xs:sequence> |
52 | | - <xs:element name="name" type="stringtype"/> |
53 | | - <xs:element name="version" type="stringtype"/> |
| 42 | + <xs:element name="name" type="bt:stringtype"/> |
| 43 | + <xs:element name="version" type="bt:stringtype"/> |
54 | 44 | </xs:sequence> |
55 | 45 | </xs:complexType> |
56 | 46 |
|
57 | 47 | <xs:complexType name="itemtype"> |
58 | 48 | <xs:sequence> |
59 | 49 | <xs:element name="product" type="producttype" minOccurs="1" maxOccurs="1"/> |
60 | | - <xs:element name="note" type="stringtype" minOccurs="0"/> |
61 | | - <xs:element name="quantity" type="inttype"/> |
62 | | - <xs:element name="price" type="dectype"/> |
| 50 | + <xs:element name="note" type="bt:stringtype" minOccurs="0"/> |
| 51 | + <xs:element name="quantity" type="bt:inttype"/> |
| 52 | + <xs:element name="price" type="bt:dectype"/> |
63 | 53 | </xs:sequence> |
64 | 54 | </xs:complexType> |
65 | 55 |
|
|
69 | 59 | <xs:element name="shipto" type="contacttype" minOccurs="0" maxOccurs="1"/> |
70 | 60 | <xs:element name="item" maxOccurs="unbounded" type="itemtype"/> |
71 | 61 | </xs:sequence> |
72 | | - <xs:attribute name="orderid" type="stringtype" use="required" /> |
| 62 | + <xs:attribute name="orderid" type="bt:stringtype" use="required" /> |
73 | 63 | <xs:attribute name="processed_at" type="xs:dateTime" /> |
74 | 64 | </xs:complexType> |
75 | 65 |
|
76 | 66 | <xs:complexType name="orderstype"> |
77 | 67 | <xs:sequence> |
78 | 68 | <xs:element name="shiporder" type="shipordertype" minOccurs="0" maxOccurs="unbounded" /> |
79 | 69 | </xs:sequence> |
80 | | - <xs:attribute name="batch_id" type="stringtype" /> |
| 70 | + <xs:attribute name="batch_id" type="bt:stringtype" /> |
81 | 71 | </xs:complexType> |
82 | 72 |
|
83 | 73 | <xs:element name="orders" type="orderstype"/> |
|
0 commit comments