<JDBCSERVER>jdbc:db2:AIRLINE</JDBCSERVER>
</DATABASEINFORMATION>
<STATEMENT>
<![CDATA[ SELECT OSAMURS3.PASSENGER.FLIGHT, OSAMURS3.PASSENGER.NAME, OSAMURS3.PASSENGER.MEMBERSHIP, OSAMURS3.SCHEDULE.AIRCRAFT, OSAMURS3.SCHEDULE.DEPARTURE, OSAMURS3.SCHEDULE.ARRIVAL, OSAMURS3.AIRCRAFT.TYPE
FROM OSAMURS3.PASSENGER,
OSAMURS3.SCHEDULE,
OSAMURS3.AIRCRAFT
WHERE OSAMURS3.PASSENGER.FLIGHT = OSAMURS3.SCHEDULE.FLIGHTNO
AND OSAMURS3.SCHEDULE.AIRCRAFT = OSAMURS3.AIRCRAFT.AIRCRAFT ORDER BY FLIGHT, NAME ]]>
</STATEMENT>
<OPTIONS>
<FORMATOPTION>GENERATE_AS_ELEMENTS</FORMATOPTION> <RECURSE>FALSE</RECURSE>
</OPTIONS>
</SQLGENERATEINFORMATION>
This file provides database connection information within the <DATABASEINFORMATION> element and the SQL statement for the SQL Query within <STATEMENT> element.
With any of the ‘Show table columns as’ options, the contents of the file do not change except for the <FORMATOPTION> element. If the ‘Elements’ option is chosen, this element is produced as shown in the example above. For the ‘Attributes’ option, the element has contents: ‘GENERATE_AS_ATTRIBUTES. Similarly, it has ‘GENERATE_PRIMARYKEYS_AS_ATTRIBUTES’ for the ‘Primary Key as attributes’ option. When the ‘Foreign keys as links’ option is selected, this element has contents: ‘GENERATE_ID_AND_IDREF’ and depending if the ‘Recurse through foreign keys’ is checked on not, the <RECURSE> element has a value set to either ‘TRUE’ or ‘FALSE’.
The Query Template file can be used to execute SQL statements at runtime. Application Developer comes with a SQLtoXML Java class library, which can be used in an application or servlet to execute SQL statements and produce results as XML. A example servlet, XMLIntegratorServerlet, has been provided, which can be used as a sample for an application.
These references are available:
http://www7b.software.ibm.com/wsdd/techjournal/0202_haggarty/haggarty.html
118 The XML Files: Development of XML/XSL Applications Using WebSphere Studio