This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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@icl.com> 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!
http://photos.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]