Do not expect any (noticeable) difference between the two overloads of the
key() function.
The two-argument one is simply a shorthand for:
key(<kName>, <kExpr>, .)
How and when the index corresponding to an xsl:key and used by a key()
function application -- this is implementation dependent, however most
implementations build an index "on-demand" -- the first time it is needed
for a particular document by a key() function.
Therefore, both overloads will not differ in this respect.
Cheers,
Dimitre Novatchev
"David Blickstein" <db@hp.com> wrote in message
news:43********@usenet01.boi.hp.com...
In my XML Schema I'm dealing with, I can assume that key(x,y) and
key(x,y,z)
always returns the same result set. That is, y is unique in key x
throughout the entire
document.
Does anyone know offhand if the performance of one form is likely to be
better than the other?
I would intuit that the 3-parameter form of key might actually be LESS
efficient in that the constraint can't be used in the key lookup but is an
additional filtering process that has to be done.
Unfortunately, I can't use IDs because I can't be guaranteed its declared
in
a DTD.