|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:key
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
<xsl:apply-templates
select="document('bib.xml')//entry[@name = $name]"/>
might work as an alternative to
...select="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: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








