This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: position() counting by 2's
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 1 Apr 2002 09:47:00 -0800 (PST)
- Subject: [xsl] Re: position() counting by 2's
- Reply-to: xsl-list at lists dot mulberrytech dot com
> It appears that position() is counting by twos. In the below
> example, I am using the position() function
> to number my output. I would like to number starting from 0.
>
> The values that $NavNumber takes on are (1, 3, 5) and
> $CorrectedNavNumber are (0, 1, 3)
This is because there are white-space only nodes in the node-list. They
are between your element nodes and also have position.
To eliminate this problem, put the following XSLT instruction in a
global scope near your xsl:stylesheet
<xsl:strip-space elements="*"/>
Hope this helped.
Cheers,
Dimitre Novatchev.
__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list