|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: position()
At 00/04/16 08:17 +0100, you wrote:
I'm using position() function in two places. ... Problem. Because you are only selecting 'section' elements. in the latter case I get 2 6 10 14 18 22 26 Because you are probably selecting more than section elements. Perhaps you are in <body> and you are asking that all child nodes be pushed through your stylesheet with <xsl:apply-templates/> (with no select= attribute) ... you are going to get *all* child nodes of <body> pushed, not just <section> nodes. <body> <title/> <section/> <section/> <note/> <section/> </body> The sections above would be counted as 4, 6, and 10 due to the intervening element nodes and the intervening text nodes. It is often the text nodes that I forget about. I've illustrated this with a diagram on page 58 of the 7th edition. The SHOWTREE stylesheet in the free resources section of our web site exposes a report of all nodes in the instance ... run your input through that stylesheet to see all of the intervening nodes. I hope this helps. ............... Ken -- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Web site: XSL/XML/DSSSL/SGML services, training, libraries, products. Practical Transformation Using XSLT and XPath ISBN 1-894049-04-7 Next instructor-led training: 2000-05-02,2000-05-11/12,2000-05-15, - 2000-06-12,2000-06-13,2001-01-27 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








