Adam Maccabee Trachtenberg wrote:
Hello Rob --

Are you sure this is right?  The xmlns prefix is supposed to be bound
to http://www.w3.org/2000/xmlns/, so I would think you would need to
use getAttributeNS() here.

I did a little research on this as well as checked out a few other implementations. namespace decls are supposed to be able to be accessed just like attributes, so I followed the specs on how those are handled when using dom level 1 functions - where namespaces dont exist.


Or are you allowed to use getAttribute() to pull out namespaced
attributes with prefixes?

yea, because when using dom level 1 functionality there really are no namespaces. This is why you aren't supposed to be mixing dom level 1 and level 2 usage. The spec leaves the details of how the handling is performed up to the implementation. The only thing an implementation must abide by when using prefixed attributes with dom level 1 functionality is that set and get must work on the same attribute.


Either way, what's the getAttributeNS() version of this supposed to
be? And what would you do to get the default namespace URI?

getAttributeNS('http://www.w3.org/2000/xmlns/','');


This one works now, but I don't know if that's spec.

There were no changes made to dom level 2 functionality, so that function has always behaved like that. Not really sure if that is right or if the localname should be xmlns, so just leaving it as is for now.

Rob

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

Reply via email to