forked from 5im-0n/xsddoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.xsd
62 lines (62 loc) · 2.37 KB
/
example.xsd
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xsddoc.xsl"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="Customer">
<xs:annotation>
<xs:documentation>This entity represents the customer
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="CompanyName" type="xs:string">
<xs:annotation>
<xs:documentation>the company name</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ContactName" type="xs:string" />
<xs:element name="ContactTitle" type="xs:string" />
<xs:element name="Phone" type="xs:string" />
<xs:element name="Fax" minOccurs="0" type="xs:string" />
<xs:element name="FullAddress" type="Address" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="CustomerID" type="xs:token">
<xs:annotation>
<xs:documentation>The customer ID</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Address">
<xs:sequence>
<xs:element name="Address" type="xs:string" />
<xs:element name="City" type="xs:string" />
<xs:element name="Region" type="xs:string" />
<xs:element name="PostalCode" type="xs:string" />
<xs:element name="Country" type="xs:string" />
</xs:sequence>
<xs:attribute name="CustomerID" type="xs:token" />
</xs:complexType>
<xs:complexType name="Order">
<xs:annotation>
<xs:documentation>The order the user made</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="CustomerID" type="xs:token" />
<xs:element name="EmployeeID" type="xs:token" />
<xs:element name="OrderDate" type="xs:dateTime" />
<xs:element name="RequiredDate" type="xs:dateTime" />
<xs:element name="ShipInfo" type="ShipInfo" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="ShipInfo">
<xs:sequence>
<xs:element name="ShipVia" type="xs:integer" />
<xs:element name="Freight" type="xs:decimal" />
<xs:element name="ShipName" type="xs:string" />
<xs:element name="ShipAddress" type="xs:string" />
<xs:element name="ShipCity" type="xs:string" />
<xs:element name="ShipRegion" type="xs:string" />
<xs:element name="ShipPostalCode" type="xs:string" />
<xs:element name="ShipCountry" type="xs:string" />
</xs:sequence>
<xs:attribute name="ShippedDate" type="xs:dateTime" />
</xs:complexType>
</xs:schema>