Subject: Re: Designs for XSLT functions (Was: Re: RE: syntax sugar for call-template)
From: Uche Ogbuji <uche.ogbuji@xxxxxxxxxxxxxxx>
Date: Tue, 20 Feb 2001 08:24:32 -0700
|
> Firstly, as we know, key() and id() are restricted to finding nodes in
> the current tree. If I want to use an extension function that
> retrieves keyed nodes in a particular document then I need to be able
> to do:
>
> <exsl:function name="my:key">
> <xsl:param name="key-name" />
> <xsl:param name="key-value" />
> <xsl:param name="file-name" />
> <xsl:param name="base-node" select="/" />
> <xsl:for-each select="document($file-name, $base-node)">
> <exsl:result select="key($key-name, $key-value)" />
> </xsl:for-each>
> </exsl:function>
I see the general gist here. However, note that since XPath 1.0 doesn't have
a general list type (which I think is near imperative for the next XPath) it
could be quite a pain to validate the idea that "multiple exsl:result"
elements are allowed as long as each evaluates to a node set".
I could do it in 4XSLT, but the implementation strategy I have in mind is
probably not a general approach.
But if other implementors don't have a problem with it, I don't.
--
Uche Ogbuji Principal Consultant
uche.ogbuji@xxxxxxxxxxxxxxx +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Re: Designs for XSLT functions (Was: Re: RE: syntax sugar for call-template), (continued)
- Uche Ogbuji - Tue, 20 Feb 2001 13:16:47 -0500 (EST)
- Uche Ogbuji - Tue, 20 Feb 2001 13:12:39 -0500 (EST)
- Michael Kay - Mon, 19 Feb 2001 17:38:07 -0500 (EST)
- Jeni Tennison - Tue, 20 Feb 2001 05:07:03 -0500 (EST)
- Uche Ogbuji - Tue, 20 Feb 2001 10:25:05 -0500 (EST) <=
- Jeni Tennison - Tue, 20 Feb 2001 13:33:03 -0500 (EST)
- Uche Ogbuji - Tue, 20 Feb 2001 16:39:58 -0500 (EST)
- Clark C. Evans - Tue, 20 Feb 2001 16:51:15 -0500 (EST)
- Michael Kay - Tue, 20 Feb 2001 11:08:35 -0500 (EST)
|
|