PDA

View Full Version : Yet another alternating color table problem



skopeko
10-10-2005, 12:00 PM
Hi *,

I've the following problem:
- A file with XML Data which calls an XSL File
- The XSL should create a table with alternating table row colors. This should be done with javaScript.

This was i made already (creates the tabe and fills it with the data):
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head>
</head>
<body>
<table border="1">
<tr>
<td><b>Name</b></td>
<td><b>SSN</b></td>
</tr>
<xsl:for-each select="perslist/emp" order-by="+name">
<tr>
<td align="left"><xsl:value-of select="name"/></td>
<td align="left"><xsl:value-of select="ssn"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>