Re: [xslt] key() in match pattern of xsl:key

On Sun, 2005-12-11 at 14:26 -0500, Joel E. Denny wrote:
> I did try replacing the referenced 
> key() with an EXSLT user function.  Assuming a key is implemented as a 
> hash, this changes the (one time) referencing key computation from O(n) to 
> O(n^2).  That is, the EXSLT user function has to re-search the entire 
> document upon every invocation whereas the referenced key() may be 
> constant time. For large XML input, I'm not sure that's going to cut it 
> with any XML processor.

You might try saxon8 (Mike Kay has done a lot of work to speed it up)
and you could also consider rewriting your expression as a join -- this
is maybe slightly clearer in XQuery.  There seem to be even bigger
performance variations between XQuery implementations than for XSLT,
partly because some implementations can run off persistent indexes.

Saxon 8 also lets you intermix XQuery and XSLT 2 expressions,
although I generally find Qizx/open to be faster.


Liam Quin, W3C XML Activity Lead,
Liam (Ankh) on the Web,
Pictures from old books:
IRC (chat) programs:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]