[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: using position to change row colors
Hi > <xsl:for-each select="Aps:VpmResultSet/Aps:PartStructure"> > <xsl:for-each select="xalan:evaluate($Name)"> > <tr> > <xsl:choose> > <xsl:when test="position() mod 2 = 0"> > <xsl:attribute name="class">dark</xsl:attribute> > </xsl:when> > <xsl:when test="position() mod 2 = 1"> > <xsl:attribute name="class">light</xsl:attribute> > </xsl:when> > </xsl:choose> Here you're testing the position() of inner for-each and in your example it's always 1. Use a variable to store the context position and then test that. Jarno XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|