[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: "Clark C. Evans" <cce@xxxxxxxxxxxxxx>
Date: Thu, 22 Feb 2001 14:58:45 -0500 (EST)
Re: Designs for XSLT functions (Was: Re:  RE: syntax su
On Wed, 21 Feb 2001, Jeni Tennison wrote:
> <xsl:variable select="my:first-alphabetically($nodes, 5)" />
>
> <exsl:function name="my:first-alphabetically">
>    <exsl:param name="nodes" />
>    <exsl:param name="number" />
>    <xsl:for-each select="$nodes">
>       <xsl:sort />
>       <xsl:if test="position() &lt;= $number">
>          <exsl:append select="." />
>       </xsl:if>
>    </xsl:for-each>
> </exsl:function>

Yes.  This is what I was intending.  In general, any 
function which has to "build" a node-set could use
this method.  The recursive variant you had below
didn't look like fun at all; kinda nasty hoop to 
jump to just do an "append".

What do you all think?  

Clark


 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.