[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: Wed, 28 Feb 2001 11:07:35 -0700
xslt function first 5
> Hi Clark,
> 
> > Not a very good example... but then again, I was trying to think of
> > a syntax that would allow a node set to be built-up over the course
> > of the function, and <exsl:return ... /> does not do this.
> 
> I did come up with a use case that I think touches on what you're
> talking about here, namely returning the first five nodes in an
> alphabetical sort of a node set.
> 
> <xsl:variable select="my:first-alphabetically($nodes, 5)" />

Well, this could be handled by an exsl:slice() function:

exsl:slice($nodes, 1, 5)

Would return the first 5 nodes of $node, using the same ordering as used by 
<for-each select="">

I personally think that broad node-set operators would make up a more general 
facility than an "append-only-to-the-result" facility.


-- 
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.