Subject: format Table and Cell in XSL?
Posted By: bebe Post Date: 10/30/2003 3:23:34 PM
I need to format my XSL file so that it will display data in a table with 2 columns. Eg:

Title:     ABC
Age:       9
Level:     12
Grade:     B

But my current display is:

Title:ABC
Age:9
Level:12
Grade:B

I have <DIV> and <SPAN> in my code. But I tried to use <TABLE> ,<TR>, <TD> .. etc. It just dun work :(


Reply By: pgtips Reply Date: 10/31/2003 4:22:39 AM
Show us your XML and XSL.
Reply By: TheBearMay Reply Date: 11/13/2003 12:49:41 PM
Something like this should work:
<table>
<xsl:for-each select="NodeID">
<tr><td> Title:</td><td>
<xsl:value-of select="Title"/>
</td></tr>
<tr><td> Age:</td><td>
<xsl:value-of select="Age"/>
</td></tr>
<tr><td> Level:</td><td>
<xsl:value-of select="Level"/>
</td></tr>
<tr><td> Grade:</td><td>
<xsl:value-of select="Grade"/>
</td></tr>
</xsl:for-each>
</table>

Go to topic 6450

Return to index page 1006
Return to index page 1005
Return to index page 1004
Return to index page 1003
Return to index page 1002
Return to index page 1001
Return to index page 1000
Return to index page 999
Return to index page 998
Return to index page 997