[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: n squared behavior with XT for 'preceding' tests?
> hi all, we have what is probably a pretty common problem: we > have a series > of elements in our input which may repeat a heading, or may > be different > than the preceding instance, ... > > now, this works fine (with XT) for small documents, but what > we find is > that, as documents get larger, this template works more and > more slowly, in > proportion to how far we've progressed through the document. Yes. It's actually quite tricky to optimise XSL so that an axis qualified by a position() predicate is only evaluated until that position is reached - there are quite a lot of special cases to be considered. I personally think this grouping requirement is sufficiently common that it deserves special support in the language. SAXON has a group-by attribute on xsl:for-each which does the job quite nicely, I can't claim that it's "The Right Way To Do It" but it's a good workaround until the standard comes up with something. Mike Kay 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
|