Subject: RE: [xsl] position() function problems on xalan From: "Florin Dragu" <florin.dragu@xxxxxxxx> Date: Thu, 23 May 2002 10:38:13 +0300 |
Thanks a lot, it works. Florin -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of David Carlisle Sent: 22 May 2002 18:56 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] position() function problems on xalan number one rule to speed up stylesheets: don't use // //call causes a search of the entire document (in particular, inside every call element to see if there are any descendent calls. /telcoCallList/calls/call is likely to be much better. //call[(count(preceding::call has n^2 performance as for each call you're going back over all the preceding ones. You just want to select the n'th one out of teh current list so: (/telcoCallList/calls/call)[position() = $current_call] > I get 3 call elements, the first from each calls sub-tree That's what you are supposed to get, so it looks like they fixed a bug you shouldn't rely on teh old behaviour. If you want the predicate to count over the whole expression not just the final step you need () as above. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] position() function probl, David Carlisle | Thread | [xsl] Re: Re: Bug in treating an RT, Dimitre Novatchev |
Re: [xsl] Working with Multiple Sty, Antonio Fiol Bonnín | Date | RE: [xsl] Counting number of charac, Michael Kay |
Month |