This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
oracle table to html via xsl
- From: "Denis McCarthy" <dmccarthy at omnipaygroup dot com>
- To: "xsl list" <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 24 Apr 2002 09:54:12 +0100
- Subject: [xsl] oracle table to html via xsl
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi there,
I'm trying to develop an xsl to convert an xml stream to a generic html
table. The xml I produce comes from an oracle database. The xml I produce
looks like this:
<results>
<numberOfRows>n</numberOfRows>
<record>
<columnName>colName1</columnName>
<columnValue>colValue1</colValue>
<columnName>colName2</columnName>
<columnValue>colValue2</colValue>
<columnName>colName3</columnName>
<columnValue>colValue3</colValue>
etc...
</record>
<record>
etc...
</record>
I would like the xsl to convert the <colName>s into <th>'s and align the
<colValue>s appropriately under the correct <th>.
I have managed this, but I had to insert the columnNames seperate from the
columnValues at the top of the xml to get it working. I would prefer if I
could keep the column names in the <record> tag (it seems more xml-esque)
I'm sure someone has done something similar if not identical before. Thanks
in advance
Denis McCarthy
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list