[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Designs for XSLT functions (Was: Re: RE: syntax su

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
Re: Designs for XSLT functions (Was: Re:  RE: syntax su
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.