Bug #51156 [Opn->Fbk]: xsl:call-template warning

From: Date: Mon, 02 Dec 2013 11:41:18 +0000
Subject: Bug #51156 [Opn->Fbk]: xsl:call-template warning
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183050@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51156&edit=1

 ID:                 51156
 Updated by:         mike@php.net
 Reported by:        matthes at leuffen dot de
 Summary:            xsl:call-template warning
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            XSLT related
 Operating System:   Ubuntu Linux
 PHP Version:        5.2.13
 Block user comment: N
 Private report:     N

 New Comment:

Cannot reproduce. Maybe fixed in current libxslt and/or PHP.


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#183050) next »