Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually
[email protected] ("Rob Richards") Mon, 16 Feb 2004 07:35:08 -0500
| Newsgroups | php.general,php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
From: Christian Stocker
> > $node->setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:b",
> > "http://www.somedomain.de/");
> >
> IMHO, that would be very confusing.
>
> I liked the idea by vivian with a third optional namespaceURI argument
> for the element object, so that at least you can use your own extended
> classes for that.
>
> And maybe we still need a ->setNamespaceURI method, even if W3C didnt
> think of that ;)
After thinking about it some more I started to think about it the same way.
One can always then use $node->prefix = "xyz" to set the prefix (if needed)
for the initial namespace delcaration.
It probably has to wait until 5.1 though since its so close to the release.
Rob