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

Re: Functional programming in XSLT

Subject: Re: Functional programming in XSLT
From: Uche Ogbuji <uche.ogbuji@xxxxxxxxxxxxxxx>
Date: Mon, 19 Mar 2001 21:31:58 -0700
Re:  Functional programming in XSLT
> | But there are still two things I don't much care for. One is the "implicit
> | result" of an RTF, I'd prefer people to write
> | 
> | <exsl:function ...>
> | <exsl:return>
> |    <tree/>
> | </exsl:return>
> | </exsl:function>
> | 
> | rather than just
> | 
> | <exsl:function ...>
> |    <tree/>
> | </exsl:function>
> 
> I agree with Michael on this.

Yes.  I'm not sure I remember who disagreed.

> | Secondly, I don't like treating multiple exsl:result's as a "recoverable
> | error".
> 
> I agree witih Michael on this, too.

Ditto.

> | I still prefer having a static constraint on where <exsl:return> can appear,
> | but if you can't live with that, have a strict rule that only one may be
> | instantiated.
> 
> A rule that only one can be instantiated seems workable to me.

Yes.  I think it should be a dynamic constraint.

> | (And incidentally, I prefer "return" to "result". It's in tune with the
> | imperative style of other keywords such as call-template, apply-templates,
> | include, import.)
> 
> I also prefer "return". It's more "verby", as M.K. notes, in the
> XSLT naming style.

I'm not sure where this idea comes from.  exslt:result sets a value for data, 
and everywhere else in XSLT that this sort of thing is done, it is declarative 
rather than imperative.  Therefore we have xsl:variable and xsl:param rather 
than xsl:let or xsl:set.  We have xsl:key rather than xsl:index.

If congruence with the rest of XSLT is the benchmark, I think exslt:result 
wins hands down.


-- 
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-2011 All Rights Reserved.