|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: position() problem with // axis + parent numbering probl
> In fact they are mutually exclusive (whooops), exactly! > just not what I was expecting. what were you expecting? It looks OK to me. Perhaps you wanted the (//text)[1] form which only returns one node (see the second half of my example in first reply). > Note that the first template has been called twice, and a position() call > inside the template returns the correct position in the context list, yet > the result appears to conflict with the predicate [1] no they are not in conflict. //text[1] is short for /descendant-or-self::node()/child::text[1] so the [1] refers to the order in the last step, ie the count from the parent. this is not the same as /descendant-or-self::text[1] so your node list selected in teh for-each selects every text node that is the first text child of its parent. there are two of those in your example, and so when _that_ list is being processed they have position() 1 and 2 respectively. David 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








