xref: /PHP-5.4/ext/dom/examples/shipping.xsd (revision 87bd7d57)
1<?xml version="1.0"?>
2<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3
4    <xsd:element       name="shipOrder" type="order"/>
5
6    <xsd:complexType   name="order">
7        <xsd:all>
8            <xsd:element   name="shipTo"    type="shipAddress"/>
9            <xsd:element   name="items"     type="cdItems"/>
10        </xsd:all>
11    </xsd:complexType>
12
13    <xsd:complexType   name="shipAddress">
14        <xsd:all>
15            <xsd:element   name="name"      type="xsd:string"/>
16            <xsd:element   name="street"    type="xsd:string"/>
17            <xsd:element   name="address"   type="xsd:string"/>
18            <xsd:element   name="country"   type="xsd:string"/>
19        </xsd:all>
20    </xsd:complexType>
21
22    <xsd:complexType   name="cdItems">
23        <xsd:sequence>
24            <xsd:element   name="item"      type="cdItem"  maxOccurs="unbounded" minOccurs="1"/>
25        </xsd:sequence>
26    </xsd:complexType>
27
28    <xsd:complexType   name="cdItem">
29        <xsd:all>
30            <xsd:element   name="title"     type="xsd:string"/>
31            <xsd:element   name="quantity"  type="xsd:positiveInteger"/>
32            <xsd:element   name="price"     type="xsd:decimal"/>
33        </xsd:all>
34    </xsd:complexType>
35
36</xsd:schema>