ID:               33305
 Updated by:       [EMAIL PROTECTED]
 Reported By:      francois dot proulx at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *XML functions
 Operating System: Linux Mandrake 10.1
 PHP Version:      5.0.4
 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.

There are a few issues with namespace reconciliation in libxml. They
are currently being addressed. In any case the two documents (expected
and actual results) although not identical have the same meaning.


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

[2005-06-10 18:10:03] francois dot proulx at gmail dot com

Description:
------------
When adding a node with a different namespace on the second or third
level of a DOM tree. DOM adds additionnal namespace declaration to the
upper levels where it shoul'nt.

I'm using libxml 2.6.17 or 2.6.19 (same issue). DOM/XML API Version
20031129.

Reproduce code:
---------------
$document = new DomDocument();
$root = $document->createElementNS(OAI_PMH_NS, "OAI-PMH");
$document->appendChild($root);

$get_record_node = $document->createElementNS(OAI_PMH_NS,
"GetRecord");
$record_node = $document->createElementNS(OAI_PMH_NS, "record");
$metadata_node = $document->createElementNS(OAI_PMH_NS, "metadata");
$node_bug = $document->createElementNS(LOM_EXPORT_NS,
"lom_prefix:lom");

$record_node->appendChild($metadata_node);
$metadata_node->appendChild($node_bug);
$get_record_node->appendChild($record_node);
$root->appendChild($get_record_node);

Expected result:
----------------
<?xml version="1.0"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/";>
  <GetRecord>
    <record>
      <metadata>
        <lom_prefix:lom
xmlns:lom_prefix="http://ltsc.ieee.org/xsd/LOM"/>
      </metadata>
    </record>
  </GetRecord>
</OAI-PMH>

Actual result:
--------------
<?xml version="1.0"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/";>
  <GetRecord xmlns:lom_prefix="http://ltsc.ieee.org/xsd/LOM";>
    <record xmlns:lom_prefix="http://ltsc.ieee.org/xsd/LOM";>
      <metadata>
        <lom_prefix:lom
xmlns:lom_prefix="http://ltsc.ieee.org/xsd/LOM"/>
      </metadata>
    </record>
  </GetRecord>
</OAI-PMH>


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


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

Reply via email to