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

Re: xsl:function

Subject: Re: xsl:function
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Wed, 21 Feb 2001 22:04:55 +0000
 Re: xsl:function
Hi Dave,

>> Actually I think it's pretty hard to encapsulate multiple values into
>> a single one in XSLT - how would you return a string, a number and a
>> node set without turning them all into an RTF? Unfortunately, I think
>> that supporting the return of multiple values either way would mean
>> extensions to XPath.  Perhaps it's something worth lobbying for for
>> XPath 2.0.
>
> I think it's certainly inconvenient. Another commented that it could
> be done already (while snipping my "yes, I know it can be done
> already" comment!). You comment that it's pretty hard. I guess it's
> something for further debate. :-) Certainly, my approach given the
> status quo would be to construct an RTF containing all of the
> information that I wanted to return.

Yes, you could fudge it with an RTF.  Create something like:

  <item type="boolean" />
  <item type="number">35</item>
  <item type="node-set">
     <node id="..." />
     <node id="..." />
     ...
  </item>

And then have a function of some kind that could take an item and give
you the relevant value from it.

A list data type (slated for XPath 2.0, as Mike pointed out) would
make it a lot simpler.

Cheers,

Jeni

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



 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.