#26242 [Fbk->Opn]: XSLT instruction comment() doesn't work when libxslt is used
ID: 26242
User updated by: apetrenko at tmsoft-ltd dot com
Reported By: apetrenko at tmsoft-ltd dot com
-Status: Feedback
+Status: Open
Bug Type: XSLT related
Operating System: Windows
PHP Version: 4.3.4
New Comment:
Hello.
This note was sent to wrong section (for ALL user). May be you'll
receive it twice.
There is a new info: it works properly in CGI mode but incorrectly in
API mode (I use Apache 1.3.27).
phpinfo reference:
http://www.aesthetic.com.ua/misc/phpinfo.htm
Sorry for some skipped info - this was done by demand of our system
administrator.
Previous Comments:
------------------------------------------------------------------------
[2003-11-13 12:59:56] rrichards@php.net
Can you send a link to your phpinfo output? as I can't reproduce this
------------------------------------------------------------------------
[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
Thread (10 messages)