|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Sortable data-table
<?xml version="1.0" encoding="ISO8859-1"?> <!DOCTYPE dataset PUBLIC 'datasetDTD' http://localhost/xmlDocs/dataset.dtd'> <?xml-stylesheet type="text/xsl" href="http://localhost/xmlDocs/dataset.xsl"?> <?cocoon-process type="xslt"?> <dataset>
<metaData>
<tableName>EMPLOYEES</tableName>
<columnInfo name="EMP_NO" type="SmallInt" size="6"/>
<columnInfo name="FIRST_NAME" type="VarChar" size="15"/>
<columnInfo name="LAST_NAME" type="VarChar" size="20"/>
</metaData>
<data>
<row>
<column name="EMP_NO">2</column>
<column name="FIRST_NAME">Robert</column>
<column name="LAST_NAME">Nelson</column>
</row>
<row>
<column name="FIRST_NAME">K. J.</column>
<column name="LAST_NAME">Weston</column>
<column name="EMP_NO">11</column>
</row>
<row>
<column name="FIRST_NAME">Luke</column>
<column name="EMP_NO">61</column>
<column name="LAST_NAME">Leung</column>
</row>
</data>
</dataset>And my xsl-file looks like this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" indent="yes"/> <xsl:template match="/"> <xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction> <html> <body> <table border="1" width="60%" bgcolor="WHITE" cellspacing="2" cellpadding="2" frame="border"> <caption> <xsl:value-of select="dataset/metaData/tableName"/> </caption> <tr> <xsl:for-each select="dataset/metaData/columnInfo"> <th> <INPUT> <xsl:attribute name="TYPE">SUBMIT</xsl:attribute> <xsl:attribute name="VALUE"> <xsl:value-of select="@name"/> </xsl:attribute> </INPUT> </th> </xsl:for-each> </tr> <xsl:for-each select="dataset/data/row"> <xsl:variable name="row" select="."/> <tr> <xsl:for-each select="/dataset/metaData/columnInfo"> <td> <xsl:value-of select="$row/column[@name = current()/@name]"/> </td> </xsl:for-each> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> It there a way to do this? And if so, how? Any suggestions and/or examples are greatly appreciated. J.S. Koldenhof _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








