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

Re: Re: xsl:function

Subject: Re: Re: xsl:function
From: Joe English <jenglish@xxxxxxxxxxxxx>
Date: Wed, 21 Feb 2001 12:55:34 -0800
xep exsl

> > > Finally, wouldn't it be useful for <xsl:function> to return multiple
> > > items?  [...]
> > 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? [...]
>
> It's already okay to have five <xsl:param> statements upon entry, so I
> figure: why should five <xsl:result> statements be such a big deal?  A hacky
> suggestion: an RTF could be constructed, where the results would be
> (ordered) immediate children of the root.  This wouldn't be necessaru if
> tuples existed in the language.  Most annoyingly, the case where one value
> is being returned isn't very elegant.  I'm not sure if it's possible to
> seriously suggest returning each result without a parent node connecting
> them (like an XML fragment).


Requirement 4.4 from [XPATH20REQ] "Should Add List Data Type to the Type System
of the Expression Language" would solve this and many other problems.
If list elements are latently typed, this might simplify things;
for instance the body of an <exsl:function> could contain the
same things as an <xsl:template>, along with <exsl:result>s.
Evaluating the function would return a list containing nodes 
(from element instantiations) and primitive values (from <exsl:result>s).


[XPATH20REQ] <URL: http://www.w3.org/TR/2001/WD-xpath20req-20010214 >

--Joe English

  jenglish@xxxxxxxxxxxxx

 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.