[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: counting the element number in a recursive tree
Thanks
If position() returns even numbers, it's because you are counting text nodes as well as elements. The answer is to count only the elements, which will happen if you use <xsl:for-each select="*"> or <xsl:apply-templates select="*"> rather than using select="node()".
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|