Zebra rows in xslt

I am creating a table from xml using xslt, and I want every other to be a different class.Here is the xml:\[code\]<interfaces> <interface id="250" name="112test" odd="1"></interface> <interface id="251" name="113test" odd="0"></interface></interfaces>\[/code\]Here is the relevant part of the xslt I've tried:\[code\]<xsl:template match="interfaces"> <xsl:for-each select="interface"> <xsl:choose> <xsl:when test="@odd = '1'"> <tr class="odd"> </xsl:when> <xsl:eek:therwise> <tr> </xsl:eek:therwise> </xsl:choose> </xsl:for-each></xsl:template>\[/code\]How do I get this working? Or is there a better way of doing this, for instance by checking if the attribute exists instead of checking its value?
 
Top