Bug #2676
closedXSL Transformation fails on the tunnel attribute
0%
Description
Using the Saxon/X PHP API 1.0.0.
The stylesheet compilation fails on param-declarations with the tunnel attribute (https://www.w3.org/TR/xslt20/#tunnel-params)
Example Stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="2.0">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:call-template name="test">
<xsl:with-param name="xxx" select="'test'"/>
</xsl:call-template>
</xsl:template>
<xsl:template name='test'>
<xsl:param name="xxx" tunnel="yes" />
<p>xxx: <xsl:value-of select="$xxx"/></p>
</xsl:template>
</xsl:stylesheet>
Error Message
Error at xsl:call-template on line 12 column 37 of style.xml: XTSE0680: Parameter xxx is not declared in the called template
If you leave out the tunnel attribute, the stylesheet compiles.
Updated by O'Neil Delpratt over 8 years ago
- Category set to Saxon Internal
- Status changed from New to In Progress
- Found in version changed from HE 9.6.0.9 to 9.6.0.9
Thanks for reporting the issue you have found. We will investigate it and report back shortly.
Updated by Michael Kay over 8 years ago
Saxon's error message is correct. If you supply a non-tunnel parameter on xsl:call-template/xsl:with-param then there must be a corresponding non-tunnel parameter on the corresponding xsl:template. That is, if it's declared as a tunnel parameter on xsl:param then it must be declared as a tunnel parameter on xsl:with-param.
Updated by Philipp F over 8 years ago
Okay, then it's not a big. Sorry to bother you and thank you very much for your frightening fast reply!
Updated by O'Neil Delpratt over 8 years ago
- Status changed from In Progress to Rejected
I am closing this issue since it has been resolved by the user.
Please register to edit this issue