ID: 26242
Updated by: [EMAIL PROTECTED]
Reported By: apetrenko at tmsoft-ltd dot com
-Status: Open
+Status: Feedback
Bug Type: XSLT related
Operating System: Windows
PHP Version: 4.3.4
New Comment:
Can you send a link to your phpinfo output? as I can't reproduce this
Previous Comments:
------------------------------------------------------------------------
[2003-11-13 12:05:16] apetrenko at tmsoft-ltd dot com
Description:
------------
XSLT instruction comment() doesn't work when libxslt is used. But when
I've replaced php extension php_domxml.dll by old version (from php
4.3.2) all was worked.
Reproduce code:
---------------
$xml = '<?xml version="1.0"?>
<root>
<A>
<!-- COMMENT 1 //-->
</A>
</root>
';
$xslt = '
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" encoding="windows-1251"/>
<xsl:template match="@*|node()|comment()">
<xsl:copy><xsl:apply-templates select="@*|node()|comment()"
/></xsl:copy>
</xsl:template>
</xsl:stylesheet>
';
$xml_obj = domxml_open_mem ($xml);
$xslt_obj = domxml_xslt_stylesheet ($xslt);
$result_obj = $xslt_obj->process ($xml_obj);
$result = $xslt_obj->result_dump_mem ($result_obj);
echo htmlspecialchars ($result);
Expected result:
----------------
<?xml version="1.0" encoding="windows-1251"?> <root> <A> <!-- COMMENT 1
//--> </A> </root>
Actual result:
--------------
<?xml version="1.0" encoding="windows-1251"?> <root> <A> </A> </root>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26242&edit=1