#27349 [Bgs->Opn]: Invalid parsing of CDATA sections in XSL templates

From: Date: Mon, 23 Feb 2004 11:14:36 +0000
Subject: #27349 [Bgs->Opn]: Invalid parsing of CDATA sections in XSL templates
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-55363@lists.php.net to get a copy of this message
 ID:               27349
 User updated by:  kalita at implix dot com
 Reported By:      kalita at implix dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         DOM XML related
 Operating System: FreeBSD 4.9
 PHP Version:      4.3.5RC3
 New Comment:

http://devel.implix.com/test_area/xmltest/
(directory index is on)

test.php - php file to make transformation
simple.xml - source xml file
simple.xsl - source xsl file
test.phps - source for the php file
phpinfo.php - phpinfo output

Please compare the output from PHP to
output from xsltproc:
xsltproc simple.xsl simple.xml

The output is different and xsltproc generates
the correct output (disabled escaping of CDATA 
section) while PHP returns CDATA section that
is escaped.


Previous Comments:
------------------------------------------------------------------------

[2004-02-23 05:12:18] chregu@php.net

This is not a PHP bug. If anyone's doing wrong here, 
it's libxslt, but I couldn't reproduce it..

------------------------------------------------------------------------

[2004-02-22 23:23:06] sniper@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.



------------------------------------------------------------------------

[2004-02-22 09:24:04] kalita at implix dot com

Description:
------------
With the most recent LibXML/LibXSLT libs CDATA sections in XSL
templates that are enclosed
in <xsl:text disable-output-escaping="yes"> give output
that IS escaped but shouldn't be.

I've been testing the transformation with xsltproc and
everything behaves correctly. That's why I assume that
this is incompatibility of the DOMXML extension with
the most recent LibXML/LibXSLT libs.

LibXML - 2.6.5
LibXSLT - 1.1.2

Note that this doesn't happen
with the LibXSLT branch 1.0.X


Reproduce code:
---------------
(...)

<xsl:text disable-output-escaping="yes">
<![CDATA[ <b> test </b> ]]>
</xsl:text>

(...)

Expected result:
----------------
<b>test</b>

Actual result:
--------------
&lt;b&gt;test&lt/b&gt;


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27349&edit=1


Thread (8 messages)

« previous php.bugs (#55363) next »