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

Re: XSLT repetition constructs

Subject: Re: XSLT repetition constructs
From: "Mukul Gandhi gandhi.mukul@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Mar 2019 11:23:20 -0000
Re:  XSLT repetition constructs
Hi all,
    I've updated the document I've prepared, at the same link (
discussing fold-left() and fold-right() functions as well.

I hope to edit the document I've prepared as I learn more about this topic.
Any more comments are welcome as well.

On Tue, Mar 5, 2019 at 9:29 PM Michael Kay mike@xxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> You might also consider including fold-left() and fold-right(). In many
> ways these are similar to xsl:iterate in that they represent an
> "accumulating" iteration where a value is computed as the output of one
> iteration and supplied as input to the next. The main differences are (a)
> xsl:iterate has multiple iteration parameters, fold-left/fold-right only
> have one; (b) xsl:iterate has a break option, fold-left/fold-right do not.
> You can't assume that recursion will be inefficient (either in time or
> space). It all depends on the implementation. With tail call optimization,
> there should be very little difference.
> There's also, of course, the option of "for $x in...", and the bang
> operator (and indeed the "/" operator). The bang operator (!) is
> semantically equivalent to xsl:for-each.
> Michael Kay
> Saxonica

Mukul Gandhi

Current Thread


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.
First Name
Last Name
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.