[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: position() counting by 2's

Subject: Re: position() counting by 2's
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 1 Apr 2002 09:47:00 -0800 (PST)
counting by 2
> 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.