Re: Re: PHP5: ext/dom - set namespace of node manually
| From: | Rob Richards | Date: | Mon, 16 Feb 2004 12:35:08 +0000 |
| Subject: | Re: Re: PHP5: ext/dom - set namespace of node manually | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general php.xml.dev |
| Request: | Send a blank email to php-general+get-177794@lists.php.net to get a copy of this message | ||
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