From:             matthes at leuffen dot de
Operating system: Ubuntu Linux
PHP version:      5.2.13
PHP Bug Type:     XSLT related
Bug description:  xsl:call-template warning

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 bug report at http://bugs.php.net/?id=51156&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51156&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51156&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51156&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51156&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51156&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51156&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51156&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51156&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51156&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51156&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51156&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51156&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51156&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51156&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51156&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51156&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51156&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51156&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51156&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51156&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51156&r=mysqlcfg

Reply via email to