
Figure 9-6 XML Schema
Example 9-1 PassengerList.xsd
<?xml version="1.0"
targetNamespace="http://www.airline.com"> <element name="Flight">
<complexType>
<sequence>
<element ref="passenger:Customer" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="flightNo" type="string" use="required"/> <attribute name="departure" type="string"></attribute>
</complexType>
</element>
<element name="Customer"> <complexType>
<sequence minOccurs="1" maxOccurs="1"> <element name="name" type="string"/> <element name="membership" type="string"/>
</sequence>
</complexType>
</element>
</schema>
Chapter 9. Developing XML Web services 183