Re: php5: ext/dom: unused namespace-definitions
| From: | Rob Richards | Date: | Wed, 07 Apr 2004 13:31:42 +0000 |
| Subject: | Re: php5: ext/dom: unused namespace-definitions | ||
| References: | 1 | Groups: | php.xml.dev |
| Request: | Send a blank email to php-xml-dev+get-359@lists.php.net to get a copy of this message | ||
From: "Vivian Steller" <news@eecoo.de>
> if i have a document like:
>
> <?xml version="1.0"?>
> <prefix:element xmlns:prefix="namespaceUri"
> xmlns:unusedPrefix="unusedNamespaceURI">
> <!-- nothing -->
> </prefix:element>
>
> you can see that there is no element making use of the namespace
> "unusedNamespaceURI".
> passing this data to any doc->loadXML($data) method, the loadXML function
> will remove the unused "xmlns:unusedPrefix" definition from the node. this
> causes problems in my programm... is there a possibility to prevent the
> function from removing unused namespaces?!
>
> I think this example shows a real case scenario - the possiblity to
prevent
> the load functions from "optimizing" the dom-tree like this would be
> helpfull.
Have no idea what you mean that it is removing the unused namespace.
doc->loadXML($data)
print doc->saveXML()
shows that the unused namespace still exists within the document. The load
does nothing special to the data other than to pass it on to libxml
Rob