> I thought that setting $root->prefix will set the prefix and the
> namespaceUri to the other domain... but it seems to me that the parser
> doesn't see the "xmlns:anotherprefix" as a prefix-declaration?
> maybe i just misunderstood something, so please correct me if so.

The current behavior is wrong (fix currently being discussed), however your
expectations are also incorrect.

Setting the prefix does not change a nodes namespace uri. Once a node is
created, it is permanently bound to the namespace URI (per specs).

Changing the prefix only changes the prefix of the current namespace on that
element, which may result in a new namespace definition on that node (if
namespace is inherited) or it may fail as in your case there would be
namespace collision due to 2 namespaces with the same prefix (which imo
should error out rather than allow it).

Rob

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to