Re: [xml-dev] namespace URI of xmlns prefix

From
Mukul Gandhi <>
To
John Heinstein <>,
Date
2005-07-15T20:59:52Z
ID
<>
Thread
Re: [xml-dev] namespace URI of xmlns prefix
--- John Heinstein <>
wrote:
> But what is the namespace URI of the attribute? What
> namespace does the 
> prefix "xmlns" belong to?

The namespace URI will be
http://www.foo.com/some.namespace

> And then you have default namespace declarations,
> such as 
> xmlns="http://www.foo.com/some.namespace".
> 
> - the namespace prefix of the attribute is an empty
> string: ''
> - the local name of the attribute is "xmlns"
> - the value of the attribute is
> "http://www.foo.com/some.namespace"
> 
> And I presume in this case, the namespace URI would
> be an empty string?

namespace URI will again be
http://www.foo.com/some.namespace

> I'm asking because I'm unsure how a DOM method like
> getAttributeNS is 
> supposed to deal with namespace declarations. Would
> xmlns attributes 
> simply be ignored in this case?

I do not think so (it will not be ignored)..

This is nice information about namespaces
http://www.rpbourret.com/xml/NamespacesFAQ.htm

Regards,
Mukul


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs