Re: [xsl] keys and idrefs - XSLT2 request?

Subject: Re: [xsl] keys and idrefs - XSLT2 request?
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 9 Oct 2001 13:34:15 +0100
Hi Dave,

> Which as you point out, indicates that XSLT has no means of using
> keys (simply) on idrefs, to find 'reverse' links.
>
> I don't particularly like the use of string routines in attributes
> to achieve this, I wonder if this drives an XSLT 2 request?

See http://www.w3.org/TR/xquery-operators/#b2b7b4c22c26c14, which as
you might guess from the anchor (!) is a description of xf:idref() to
do just what you're after, enacting the requirement 2.12 of the XSLT
2.0 Requirements.

Another approach would be to use a tokenize() extension function to
get the values against which the processes were keyed. This would work
because when a node has a node set as a key value it is indexed by the
values of all the nodes in the node set. So you could do something
like:

<xsl:key name="control"
         match="process"
         use="str:tokenize(@control)"/>

And of course this would work whether you had access to the DTD or
not.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread