After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 62075 - <xsl:apply-templates> doesn't pass parameters with <xsl:with-param> 2
<xsl:apply-templates> doesn't pass parameters with <xsl:with-param> 2
Status: VERIFIED NOTABUG
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-10-10 14:35 UTC by andres.sade
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description andres.sade 2001-10-10 14:35:25 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
Comment 1 Daniel Veillard 2001-10-10 14:52:37 UTC
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
Comment 2 andres.sade 2001-10-10 15:02:51 UTC
Weird , same example works well with sablotron .
Comment 3 Daniel Veillard 2001-10-10 20:40:46 UTC
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
Comment 4 Daniel Veillard 2001-10-30 19:14:20 UTC
no new informations,

Daniel
Comment 5 andres.sade 2001-10-31 08:48:42 UTC
At least saxson works like libxslt. So, seems only sablotron have that feature (or 
bug? ).
Comment 6 Daniel Veillard 2001-10-31 12:10:34 UTC
It's definitely a sablotron bug, not handling properly the difference
between the document node and the top level root node

Daniel