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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

http://www.w3.org/TR/WD-xsl and position()

Status
Not open for further replies.

EliseD

Programmer
Jun 22, 2004
12
FR
Hi
i use the " namespace for my xslt

the problem is that i want to implement a row color alternated in a table.
The exemples i saw use position() thaht is not available in this namespace

Ma question is : ss there a posible solution to make an alternate row color with this old namespace ??
 
<xsl:if test="position() mod 2 = 0">

Position is an XPath function, not an XSLT element. So it does not require the namespace.
 
well i tested and i get an unknown method error for "position()"

so it seems that it doesn't work with this version
 
Dont know why position() wouldn't work, do other x-path functions (like count() ) work?
If so, maybe you could use count() on preceding-sibling.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top