[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:variable with hex color values
Hi, I'm trying implementing a XSL which distinguishes odd and even row
of a table by using different colors. My solution involves the testing
of the number or the position, something like this:
<xsl:choose> <xsl:when test="position() mod 2"> <td bgcolor = "..."> .... </td> </xsl:when> <xsl:otherwise> <td bgcolor = "..."> .... </td> </xsl:otherwise> </xsl:choose> the existing code inside each of the <td>'s differs only in the background color, which resolves into big time redundancy. Is there any way to assign the color value to a variable and then using it in the bgcolor attribute? I've tried using something like <xsl:variable name="bg" select="Black"> and then <td bgcolor = "$bg"> but it doesn't seem to work. I've tried with hex color values, which is my objective, and it didn't work either. Thanks, Rolando
|
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
|