ID:               47666
 Updated by:       rricha...@php.net
 Reported By:      info at pcxtra dot nl
-Status:           Open
+Status:           Bogus
 Bug Type:         DOM XML related
 Operating System: Fedora 9
 PHP Version:      5.2.9
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.


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

[2009-03-15 21:23:12] info at pcxtra dot nl

Description:
------------
SaveXML method generates html element with TWO xmlns attributes (which
is not well formed XML).

Reproduce code:
---------------
$html = <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
  </head>
  <body>
  </body>
</html>
HTML;

$doc = new DOMDocument();
$doc->loadHTML( $html );
$result = $doc->saveXML();

$doc2 = new DOMDocument();
$doc2->loadXML( $result );
$result2 = $doc->saveXML();
  
echo $result2;


Expected result:
----------------
The expected result is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
  </head>
  <body>
  </body>
</html>

Actual result:
--------------
Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]:
Attribute xmlns redefined in Entity, line: 3 in
/home/siuser/www/dev/engine/100/test.php on line 21

$result shows two xmlns attributes for the html element:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
xmlns="http://www.w3.org/1999/xhtml";>
  <head>
  </head>
  <body>
  </body>
</html>


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


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

Reply via email to