Alternate row coloring in xsl





4
Date Submitted Fri. Aug. 4th, 2006 9:48 AM
Revision 1 of 1
Syntax Master sundaramkumar
Tags XSL
Comments 0 comments
Alternate row coloring in xsl


<xsl:variable name="choosebg"><xsl:value-of select="position()"/></xsl:variable>
<xsl:choose>
<xsl:when test="$choosebg mod 2 = 0">
<xsl:attribute name="bgcolor">#ededed</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
</xsl:otherwise>
</xsl:choose>


 

Comments

There are currently no comments for this snippet.

Voting