Re: [xsl] having a template remember not to call itself again

Subject: Re: [xsl] having a template remember not to call itself again
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 5 Mar 2023 16:56:50 -0000
Am 3/5/2023 um 5:40 PM schrieb Graydon graydon@xxxxxxxxx:
The XSLT 3 approach is the transform function, where you write
individual stylesheets for each step and call them:

<xsl:variable name="pass1" as="document-node()">
         <xsl:sequence select="
             transform(map {
               'stylesheet-location': 'pass1.xsl',
               'source-node': /*
             }
             )?output" />
</xsl:variable>

<xsl:variable name="pass2" as="document-node()">
         <xsl:sequence select="
             transform(map {
               'stylesheet-location': 'pass2.xsl',
               'source-node': $pass1
             }
             )?output" />
</xsl:variable>

And so on.


Doesn't "And so on" translate into using fold-left e.g.

B  fold-left(('pass1.xsl', 'pass2.xsl', 'pass3.xsl'), /, function($n,
$x) { transform(map{'stylesheet-location': $x, 'source-node' : $n
})?output })

?

Current Thread