
[056]<simpleType>
[057]<restriction base="string">
[058]<maxLength value="10"/>
[059]</restriction>
[060]</simpleType>
[061]</element>
[062]<element name="ARRIVAL" nillable="true">
[063]<simpleType>
[064]<restriction base="string">
[065]<maxLength value="10"/>
[066]</restriction>
[067]</simpleType>
[068]</element>
[069]<element name="TYPE" nillable="true">
[070]<simpleType>
[071]<restriction base="string">
[072]<maxLength value="30"/>
[073]</restriction>
[074]</simpleType>
[075]</element>
[076]</schema>
The first element generated is SQLResult is the complex type. Appropriately, it can have a minimum of no records with the
Every column name has been declared as an <simpleType> element, each of type string and a max length (lines 27 to 75). This has been declared a <restriction> element. All columns, besides ‘flight’ and ‘membership’ columns, are declared as nillable.
The element <PASSENGER_SCHEDULE_AIRCRAFT> has been declared as a complexType which hold all the other elements and to be in the order specified (lines 16 to 25).
The XML Schema file generated through the ‘Attributes’ option is tabulated below:
Example
[001]<?xml version="1.0"
[002]<schema targetNamespace="http://www.ibm.com/PASSENGER_SCHEDULE_AIRCRAFT" xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:PASSENGER_SCHEDULE_AIRCRAFT="http://www.ibm.com/PASSENGER_SCHEDULE_AIRCRA FT">
[003]<element name="SQLResult">
[004]<complexType>
112 The XML Files: Development of XML/XSL Applications Using WebSphere Studio