RE: Possible new key() function (Was: Re: [xsl] Finding the maxim un number of nodes)

Subject: RE: Possible new key() function (Was: Re: [xsl] Finding the maxim un number of nodes)
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 9 Jan 2001 20:43:12 -0800 (PST)
This discussion was prompted by Jeni's and mine interest in finding a
way to ensure more efficient way of evaluation of an XPath expression.

In case existing XSLT processors already did such optimisations by
default then nobody would have cared...

Therefore, it would be ideal if such optimisations are done behind the
scenes and the XSLT author would not have to be concerned how to
specify/trigger them.

There are a couple of issues here:

1. Is this automatic optimisation possible at all? If it were possible
-- then nothing would prevent today's XSLT processors to perform such
optimisations -- do not ban the key() function, just make processors
clever enough, so that people would stop using the key() function.

2. In my opinion it is too late and probably it would be harmful to
remove the key() function from XSLT. A whole "culture" has been already
established using the key() function -- it has some very significant
methods of application like the Muenchian method -- by killing the 
key() function one would also kill all this accumulated wealth of
expertise and methodical way of thinking around it.

Dimitre Novatchev

--- Kay Michael <Michael.Kay@xxxxxxx> wrote:
> > > In this case xsl:key will know in advance about all possible
> > > operators and could build the indexes in an optimal way in order
> to
> > > guarantee most efficient key() performance.
> The more I listen to this discussion, the more convinced I am that
> SQL got
> it right and XSLT got it wrong: keys should be used implicitly,
> behind the
> scenes, when the optimizer decides and not when the user decides.
> Rather
> than having new variants on the key() function, we should do away
> with the
> function entirely.
> Mike Kay 

Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!

 XSL-List info and archive:

Current Thread