Project

Profile

Help

Bug #2676

closed

XSL Transformation fails on the tunnel attribute

Added by Philipp F over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Low
Category:
Saxon Internal
Start date:
2016-03-15
Due date:
% Done:

0%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
9.6.0.9
Fixed in version:
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

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.

Actions #1

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.

Actions #2

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.

Actions #3

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!

Actions #4

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

Also available in: Atom PDF