Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.3.2
-
Ubuntu 13.04
Description
Parameters passed with xsl:apply-templates to templates does not work. Following codes work with online validator (http://xslttest.appspot.com/) but fail to work with QtXmlPatterns.
This example should transform to text "Works". With QtXmlPatterns, result is only a string with empty lines.
XML:
<?xml version="1.0" encoding="UTF-8" ?> <?xml-stylesheet type="text/xsl" href="transform.xsl"?> <document> <items> <item/> </items> <start value="Works"/> </document>
XSLT:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method='html' version='5.0' encoding='UTF-8' indent='yes'/> <xsl:template match="/document/start"> <xsl:apply-templates select="/document/items/*"> <xsl:with-param name="par" select="@value"/> </xsl:apply-templates> </xsl:template> <xsl:template match="item"> <xsl:param name="par"/> <xsl:value-of select="$par"/> </xsl:template> </xsl:stylesheet>