<xsl:variable name="number">"><xsl:value-of select="record/sno"/></xsl:variable>
<xsl:if test="$number mod 2 != 0"> I am not sure if mod is a valid function,
atleast not according to this web-page.
http://www.w3schools.com/xsl/xsl_functions.asp I have not cross-checked with the XPath/XSL standard...
However, in your case, if the value of the element
sno represents the order, then you could use
the position() function to acheive your result:
Something like :
<xsl:if
test = "(position() * 2) = ./sno">
This test I believe will be true for even rows and
false for odd rows.
Also, since you have ONLY two posibilities (assuming
the values of sno are not decimal),
you should probably
use a choose/when/otherwise construct instead of the if...
I would personally prefer:
<xsl:choose>
<xsl:when test = "(position() * 2) = ./sno">
<!-- This is an even row, use white color -->
</xsl:when>
<xsl:otherwise>
<!-- This is an odd row, use gray color -->
</xsl:otherwise>
</xsl:choose>
Hope this helps.
regds.
- madhav
[ November 28, 2003: Message edited by: Madhav Lakkapragada ]