GNOME Bugzilla – Bug 62075
<xsl:apply-templates> doesn't pass parameters with <xsl:with-param> 2
Last modified: 2009-08-15 18:40:50 UTC
Example if I try to do following: --- xsl --- <?xml version="1.0"?> <xsl:stylesheet xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:apply-templates> <xsl:with-param name="x">XXX</xsl:with-param> </xsl:apply-templates> </xsl:template> <xsl:template match="para"> <xsl:param name="x" select="default"/> <xsl:value-of select="$x"/>:<xsl:apply-templates/> </xsl:template> </xsl:stylesheet> -- xml -- <?xml version="1.0"?> <doc> <para>DUMMY</para> </doc> Then the result is: <?xml version="1.0"?> :DUMMY But should be: <?xml version="1.0"> XXX:DUMMY
Wrong, not a bug. The apply template applies to the childs of the current node. Current node is the root, not the doc node ! Try with <?xml version="1.0"?> <para>DUMMY</para> as the input ! It withh then work In the future use the -v option of xsltproc to see what's happening before raising false alerts Daniel
Weird , same example works well with sablotron .
Well if Saxon and Xalan agree with sablotron, please reopen the bug list I will investigate but apparently it looks like a sablotron bug, really. Daniel
no new informations, Daniel
At least saxson works like libxslt. So, seems only sablotron have that feature (or bug? ).
It's definitely a sablotron bug, not handling properly the difference between the document node and the top level root node Daniel