Subject:Xml to html conversion Author:priya narayan Date:17 Jul 2006 05:06 PM
Hi,
I am novice to xslt and was looking for some good solution to a problem. I have an xml file that is generated dynamically and randomly. User can select what columns of the xml should be outputed.
There can also be some other XML file with 5 coulmns and with different column names. Depending on the columns selected by the user, I want to pass the columns as parameters and process the xml file so that only coulmns user needs is displayed.
It would be really great if you guys can provide me some ideas about how a generic solution can be developed.
Subject:Xml to html conversion Author:Ivan Pedruzzi Date:17 Jul 2006 10:56 PM
Hi Priya,
Attached you can find one of many possible solutions.
To keep the code simple and XSLT 1.0 compliant, you will need to format the parameter value as
list of column names separated by space, also the list needs to start and to end with a space.
If want it to be displayed as
<head>
<th><td>header1</td></th>
<th><td>header2</td></th>
<th><td>header3</td></th>
</head>
2) In your attached document, can I use someparameter for node set XML_Ds/Table instead of hardcoding in the xsl file.
<xsl:for-each select="XML_Ds/Table">