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>






There are currently no comments for this snippet.