From: apetrenko at tmsoft-ltd dot com
Operating system: Windows
PHP version: 4.3.4
PHP Bug Type: XSLT related
Bug description: XSLT instruction comment() doesn't work when libxslt is used
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 bug report at http://bugs.php.net/?id=26242&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26242&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26242&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26242&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26242&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26242&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=26242&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26242&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26242&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26242&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26242&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26242&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26242&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26242&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26242&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26242&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26242&r=float