Generic XSL for table with column names
-
Hi, I am trying to create a generic xsl file to display query results. The column names depend upon the query, so I dont want to hardcode them. What I have is close to what I need, but I get one row of column headings for each row of data. (Just one would do!) I can see that the for-each command in the table header is causing the problem, but I'm not sure how to select just one row. Any advise would be really helpfull. Thanks. :) My data looks like this:
AVL1A
RED 9437.914XYZ
BLUE 9437.914 And my xsl looks like this (portion): -
Hi, I am trying to create a generic xsl file to display query results. The column names depend upon the query, so I dont want to hardcode them. What I have is close to what I need, but I get one row of column headings for each row of data. (Just one would do!) I can see that the for-each command in the table header is causing the problem, but I'm not sure how to select just one row. Any advise would be really helpfull. Thanks. :) My data looks like this:
AVL1A
RED 9437.914XYZ
BLUE 9437.914 And my xsl looks like this (portion):<thead> <tr align="center"> <xsl:for-each match="//ResultRow[1]/*"> <td><strong><xsl:value-of select="name()" /></strong></td> </xsl:for-each> </tr> </thead>
"When the only tool you have is a hammer, a sore thumb you will have."
-
<thead> <tr align="center"> <xsl:for-each match="//ResultRow[1]/*"> <td><strong><xsl:value-of select="name()" /></strong></td> </xsl:for-each> </tr> </thead>
"When the only tool you have is a hammer, a sore thumb you will have."
Thanks, that's working now!:-D