Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
XML
XSL newbie question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Christoph, post: 778394"] Given the following sample xml document: <resultdata> <row> <field1>Field 1 Value</field1> <field2>Field 2 Value</field2> <field3>Field 3 Value</field3> </row> <row> <field1>Field 1 Value</field1> <field2>Field 2 Value</field2> <field3>Field 3 Value</field3> </row> </resultdata> what would the XSL look like such that it produces the following HTML <table> <tr><th>field1</th><th>field2</th><th>field3</th></tr> <tr><td>Field 1 Value</td><td>Field 2 Value</td><td>Field 3 Value</td></tr> <tr><td>Field 1 Value</td><td>Field 2 Value</td><td>Field 3 Value</td></tr> </table> without (and here's what I can't figure out) hardcoding any of the node names? I'd like to come up with a generic XSLT that can handle any xml document representing db table rows, regardless of the table. I just can't figure out how to make the first HTML table row (consisting of the TH's) to contain just the unique node names and then each subsequent HTML table row list out the values of each <row> child node. I have no problem coming up with the requisite XSLT if I hard code everything. But I just can't figure out how to do it dynamically. Any pointers would be greatly appreciated! thnx, Christoph [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
XML
XSL newbie question
Top