Re: xsl:key

Subject: Re: xsl:key
From: "David Marston/CAM/Lotus" <David_Marston@xxxxxxxxx>
Date: Thu, 4 May 2000 11:44:11 -0400
Keys offer another kind of flexibility that may be useful in a
few situations: the keyed items can be located at irregular places
in the tree. When David Carlisle says:
>Like id, key is replaceable by some construction selecting
>nodes based on an XPath expression, so you just have to trust that
>the implementors implement it at least no less efficiently
>than that.
...that's certainly a good point, but you won't always have the
alternative of an XPath expression, short of a humongous union.

More concretely, Mike French suggests that
select="document('bib.xml')//entry[@name = $name]"/>
might work as an alternative to"key('bib',$name)"
but that's only possible if every 'entry' of interest is two levels
down. There may be situations where that's not the case.
.................David Marston

 XSL-List info and archive:

Current Thread