<xsl:with-param> is not handled properly with nested template invocations. xslt-with-param
authorJakub Wieczorek <faw217@gmail.com>
Fri, 30 Apr 2010 13:11:21 +0000 (15:11 +0200)
committerJakub Wieczorek <faw217@gmail.com>
Fri, 30 Apr 2010 13:11:21 +0000 (15:11 +0200)
commited9627a579d0789eeaf939a4c1225d44a12a231f
tree73fcda18962f1d18b5a8203daaded7f6006714b6
parent0599478b270ae277121a55c6040acc15edd4d6eb
<xsl:with-param> is not handled properly with nested template invocations.

Change ParseContext to keep a stack of parameter lists to pass to the templates,
not just a single list. Currently, in the case of nested <xsl:call-template />
elements, such as:

<xsl:call-template name="template1">
<xsl:with-param name="a">foo</xsl:with-param>
        <xsl:with-param name="b">
         <xsl:call-template name="template2">
                        <xsl:with-param name="c">bar</xsl:with-param>
                </xsl:call-template>
</xsl:with-param>
</xsl:call-template>

the "a" parameter will leak to the list of parameters to be passed to the second
template. Moreover, after the resolution of the "b" parameter, the list would be purged,
and as a result the "a" parameter would not be passed to the template1 invocation.

Task-number: QTBUG-10309
src/xmlpatterns/parser/qparsercontext_p.h
src/xmlpatterns/parser/querytransformparser.ypp