Bug #51156 [Fbk->NoF]: xsl:call-template warning
Edit report at https://bugs.php.net/bug.php?id=51156&edit=1
ID: 51156
Updated by: php-bugs@lists.php.net
Reported by: matthes at leuffen dot de
Summary: xsl:call-template warning
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: XSLT related
Operating System: Ubuntu Linux
PHP Version: 5.2.13
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2013-12-02 11:41:16] mike@php.net
Cannot reproduce. Maybe fixed in current libxslt and/or PHP.
------------------------------------------------------------------------
[2010-02-26 13:58:56] matthes at leuffen dot de
Description:
------------
When using XSLT there is a PHP Warning triggered on every <xsl:with-param/> Element.
The Result is as expected (it is an annoying message).
(The Warning occurs also when using <xsl:with-param name="xy"
select="'string'"/>)
Reproduce code:
---------------
--Stylesheet--
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:stylesheet [
]>
<xsl:stylesheet version="1.0" xml:space="preserve" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" xml:space="preserve" indent="yes"
encoding="UTF-8"/>
<xsl:template name="TestTemplate">
<xsl:param name="Param1"/>
<xsl:text>Parameter1 Value: </xsl:text><xsl:copy-of select="$Param1"/>
</xsl:template>
<xsl:template match="/Test">
<xsl:call-template name="TestTemplate">
<xsl:with-param name="Param1">testOutput to print</xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
--/Stylesheet--
--PHP Code--
<?php
$data = <<<EOT
<Test></Test>
EOT;
$xml = new DOMDocument("1.0", "UTF-8");
$xml->loadXML($data);
$proc = new XSLTProcessor();
$xslp = new DOMDocument();
$xslp->load("test.xsl");
$proc->importStyleSheet($xslp);
echo $proc->transformToXml($xml);
--/PHP Code--
Expected result:
----------------
Parameter1 Value: 'testOutput to print'
Actual result:
--------------
Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: xsl:call-template:
misplaced text element in /home/matthes/Projects/FuPShop/tmp/transform.php on line 23
Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: xsl:call-template:
misplaced text element in /home/matthes/Projects/FuPShop/tmp/transform.php on line 23
Parameter1 Value: 'testOutput to print'
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=51156&edit=1
Thread (3 messages)