Apr 21, 2006 #1 Dielzen Programmer Apr 21, 2006 1 US My XML file gets turned into a table and displayed as HTML (no shock there) but all the table rows look the same. How can I make every other row reference a seperate CSS element when using for-each to step through my XML?
My XML file gets turned into a table and displayed as HTML (no shock there) but all the table rows look the same. How can I make every other row reference a seperate CSS element when using for-each to step through my XML?
Apr 23, 2006 #2 JontyMC Programmer Nov 26, 2001 1,276 GB One way to do it: Code: <xsl:if test="position() mod 2 = 1"> <xsl:attribute name="class">oddRow</xsl:attribute> </xsl:if> Jon "I don't regret this, but I both rue and lament it. Upvote 0 Downvote
One way to do it: Code: <xsl:if test="position() mod 2 = 1"> <xsl:attribute name="class">oddRow</xsl:attribute> </xsl:if> Jon "I don't regret this, but I both rue and lament it.