Re: Correcting a prior error
At 05:44 AM 7/30/2010, Dave wrote:Or change this to count(ancestor::*|preceding::*) + 1?
Or count(ancestor::*) + count(preceding::*) + 1 to avoid the cost of unnecessarily sorting into document order, merging the lists, and eliminating the non-existent duplicates. (That's one reason I suggested xsl:number. Another, more important, is that in Saxon, xsl:number is optimized so that when you make repeated calls with the same attributes to number successive nodes, Saxon doesn't count all the nodes from the beginning of the document each time, it only counts back to the most recently numbered node).
Michael Kay Saxonica
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