Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link formatting

Status
Not open for further replies.

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?
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top