ID: 40956
Updated by: [EMAIL PROTECTED]
Reported By: 131 dot php at cloudyks dot org
-Status: Open
+Status: Feedback
Bug Type: DOM XML related
Operating System: Linux RedHat
PHP Version: 5.2.1
New Comment:
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 the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
Previous Comments:
------------------------------------------------------------------------
[2007-03-30 07:10:28] 131 dot php at cloudyks dot org
Description:
------------
DOMDocumentType entities fails to return a valid tree
Reproduce code:
---------------
$xml_str=XML_VERSIOn."<!DOCTYPE jsx SYSTEM 'lang/$lang.dtd'><jsx>s
&lang_key.fr;</jsx>";
$doc = new DOMDocument("1.0","utf-8");
$doc->resolveExternals=true;
$doc->substituteEntities=true;
$doc->loadXML($xml_str);
$dtd=$doc->firstChild;
echo $dtd->publicId;//('')=>ok
echo $dtd->systemId;//('lang/fr.dtd')=>ok
echo $dtd->name;//('jsx')=>ok
echo $dtd->internalSubset;//('<!...')=>ok
foreach($dtd->entities as $elem) echo "even one";
//nope :(
echo $doc->saveXML();die;//<jsx>s Francais</jsx>=>ok
Expected result:
----------------
.*?
even one
.*?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40956&edit=1