This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Designs for XSLT functions (Was: Re: RE: syntax sugar for call-template)
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: Designs for XSLT functions (Was: Re: [xsl] RE: syntax sugar for call-template)
- From: Uche Ogbuji <uche dot ogbuji at fourthought dot com>
- Date: Wed, 28 Feb 2001 11:07:35 -0700
- cc: "Clark C. Evans" <cce at clarkevans dot com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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@fourthought.com +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