[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-22 Thread Rob Richards
From: Vivian Steller > i now can use the following syntax to set the namespaceUri of a node: > > $element = new DomElement("tagname", "value", "http://namespaceUri";); > // or > $element = new DomElement("pref:tagname", "value", "http://namespaceUri";); > // works

[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-17 Thread Vivian Steller
Rob Richards wrote: > 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 elemen

[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Rob Richards
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

[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Christian Stocker
On 2/16/04 12:07 PM, Rob Richards wrote: Porting the setNamespace function to PHP5 would be nice. Another solution could be the possibility to append a namespace-node (is the domnamespacenode class currently used by any functions?) or the setAttribute checks wether some "xmlns"/"xmlns:" attribut

[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Rob Richards
> Porting the setNamespace function to PHP5 would be nice. Another solution > could be the possibility to append a namespace-node (is the > domnamespacenode class currently used by any functions?) or the > setAttribute checks wether some "xmlns"/"xmlns:" attribute is set and > updates namespaceUri

[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Vivian Steller
Christian Stocker wrote: > ... > Vivian, it's not possible the set the namespace according to the W3C > standard, except with createElementNS(). As Adam said, in PHP 4, there > was the option set_namespace, which isn't ported to PHP5 (yet). > > Maybe we should port that function as well, to allow

[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-15 Thread Christian Stocker
On 2/16/04 1:24 AM, Adam Bregenzer wrote: On Sun, 2004-02-15 at 19:04, Vivian Steller wrote: As you can see it is impossible to set the namespace manually! I tried to set it with the help of a DomNamespaceNode-object but those objects are no "real" nodes (why!?!) and the consequence is that you

Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-15 Thread Adam Bregenzer
On Sun, 2004-02-15 at 19:04, Vivian Steller wrote: > As you can see it is impossible to set the namespace manually! I tried to > set it with the help of a DomNamespaceNode-object but those objects are no > "real" nodes (why!?!) and the consequence is that you couldn't append such > a node with $nod

[PHP] PHP5: ext/dom - set namespace of node manually

2004-02-15 Thread Vivian Steller
Hello, the following code shows my problem: appendChild($node); $node->setAttribute("xmlns", "http://www.somedomain.de/";); print("Namespace: '" . $node->namespaceURI . "'"); $xmlCode = $doc->saveXML(); print("" . htmlspecialchars($xmlCode) . "");