Re: [xsl] XSLT repetition constructs

Subject: Re: [xsl] XSLT repetition constructs
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 5 Mar 2019 15:59:51 -0000
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
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 KaySaxonica

  On 5 Mar 2019, at 09:56, Mukul Gandhi gandhi.mukul@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
  Hi all, I've written a document explaining different XSLT repetition
  constructs. Its available at,
  Any comments, corrections to this document are welcome.

  Mukul Gandhi

  XSL-List info and archiveEasyUnsubscribe (by email)

XSL-List info and archiveEasyUnsubscribe (by email)

Current Thread