Code:
<xsl:if test="position() mod 2 = 1">
<tr bgcolor="#aaccff">
<td><xsl:value-of select="au_lname"/></td>
<td><xsl:value-of select="au_fname"/></td>
<td><xsl:value-of select="phone"/></td>
</tr>
</xsl:if>
<xsl:if test="position() mod 2 = 0">
<tr bgcolor="#ffccaa">
<td><xsl:value-of select="au_lname"/></td>
<td><xsl:value-of select="au_fname"/></td>
<td><xsl:value-of select="phone"/></td>
</tr>
I don't want to do it like the code above because I find it very redundant especially if you have a big xsl. Is there a better way to do this?
Like, if position mod 2 = 1, then apply this style to all TDs, otherwise apply this other style.
Thank you very much.