[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] with-param name attribute value template (v3)

Subject: [xsl] with-param name attribute value template (v3)
From: Andre Cusson <ac@xxxxxxxxxxxxx>
Date: Sun, 27 Oct 2013 01:18:40 -0400


In a directly and indirectly recursive stylesheet, with a series of tunnel parameters being pushed and read to/from the tunnels as the computation progresses, when new values need to be passed for some (a subset) of the tunnel parameters, typically because only those parameters have new values for the following iterations/recursions, what would be the recommended pattern to use? Can it be possible not to have to access the parameters whose values are not used nor referred to in the current template iteration/recursion and having to pass the complete series of parameters again, and, in fact nulling the use of tunnels?

It seems that it would be useful to make the name attribute of the xsl:with-param xslt element, an /attribute value template/, like for the xsl:attribute name attribute, so that passed parameter names can be computed, as, for example, in:

<xsl:call-template name="some-template">
<xsl:with-param name="param1" select="some value" tunnel="yes"/>
<xsl:for-each select="$modified-param-values-as attributes-element/@*[local-name(.) = ($tunnel-parameter-name-list) and normalize-space(.)">
<xsl:with-param name="{local-name(.)}" select="normalize-space(.)" tunnel="yes"/>

Of course, this becomes further acute as the number of running tunnel parameters increases, as well as according to the recursion flow sophistication.


Current Thread