But xsql will put row suffix the end the cursor field
|
|
---|
<xsql:query connection=”momnpup”
xmlns:xsql=”urn:oracle-xsql”
rowset-element=”PRODUCTS”
row-element=”PRODUCT”
id-attribute=”count”>
SELECT id AS product_id,
name AS product_name,
price AS product_price
FROM product
</xsql:query>For this simple example, the output is valid according to the schema, and you didn’t need XSLT at all. The next example requires XSLT. You need to output data that looks like this:
Web Services with XSQL | 465 |
---|
<CATEGORY id=”8”>
<NAME>Outdoor Clothing -- Men</NAME>
<DESCRIPTION>Functional wear for the outdoorsmen</DESCRIPTION>The output of this XSQL is as follows:
<PRODUCT_CATEGORIES>
<CATEGORY num=”1”>
<ID>7</ID>
<NAME>Bathroom</NAME>
<DESCRIPTION>Keep clean and healthy with these products</DESCRIPTION> <PRODUCTS>
<PRODUCTS_ROW num=”1”>
<ID>10</ID>
<NAME>Band-aids</NAME>