XSP All Nodes Even

2003-01-23 Thread Jacob Arnold
Whenever I test for even nodes using XSLT on my serialized XSP, all the nodes are even. For example, I'm trying to make every even table row a different color: xsl:template match=tr xsl:if test=position() mod 2 = 0 tr class=evenrowxsl:apply-templates//tr /xsl:if xsl:if test=position()

Re: XSP All Nodes Even

2003-01-23 Thread Scott Warren
What is the value that position() is returning? Can you move the template into a another template that has a xsl:for-each select=tr I think you may get different results then. Hope this helps Scott Warren Jacob Arnold wrote: Whenever I test for even nodes using XSLT on my serialized XSP, all

Re: XSP All Nodes Even

2003-01-23 Thread Scott Warren
What is the value that position() is returning? Can you move the template into a another template that has a xsl:for-each select=tr I think you may get different results then. Hope this helps Scott Warren Jacob Arnold wrote: Whenever I test for even nodes using XSLT on my serialized XSP, all

RE: XSP All Nodes Even

2003-01-23 Thread Jacob Arnold
All Nodes Even What is the value that position() is returning? Can you move the template into a another template that has a xsl:for-each select=tr I think you may get different results then. Hope this helps Scott Warren Jacob Arnold wrote: Whenever I test for even nodes using XSLT on my

Re: XSP All Nodes Even

2003-01-23 Thread Scott Warren
. through 114. Are you suggesting adding a second stylesheet? Thanks, J -Original Message- From: Scott Warren [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 4:22 PM To: [EMAIL PROTECTED] Subject: Re: XSP All Nodes Even What is the value that position() is returning? Can you move t

RE: XSP All Nodes Even

2003-01-23 Thread Jacob Arnold
Yep, that works. Thanks for your help. Best Regards, J -Original Message- From: Scott Warren [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 4:33 PM To: [EMAIL PROTECTED] Subject: Re: XSP All Nodes Even No not a second stylesheet, Change your stylesheet to be like

Re: XSP All Nodes Even

2003-01-23 Thread J.Pietschmann
Jacob Arnold wrote: Whenever I test for even nodes using XSLT on my serialized XSP, all the nodes are even. This is a FAQ. Most probably you are counting whitespace nodes. Either avoid selecting text nodes, for example by explicitely specifying the element you want to match: