Subject: RE: [xsl] Counting nodes efficiently From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx> Date: Thu, 19 Feb 2004 09:07:28 -0000 |
I wrote: > 1. Create a node-set by selecting all the elements you wish > to count and numbering them using position(). You can then > query into this node-set using the generate-id() function to > get the correct number for the element you're processing. > This only requies one pass of the data so its quite efficient. > > 2. Write a SAX Filter in java that numbers the elements on > their way into the transform. You can then select this > number as if it was already in the data. > > 3. If you are using saxon, you can substring the value > returned from generate-id() after the 'e', as the generated > id's take form 'dxxeyy' where d is the document number and e > is the element number. ...having got the wrong end of the stick. (I guess I read the title more than the post) :-) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Counting nodes efficientl, Michael Kay | Thread | RE: [xsl] Counting nodes efficientl, Dimitre Novatchev |
RE: [xsl] XML validation, David . Pawson | Date | [xsl] Re:, Peter Flynn |
Month |