[Home] [By Thread] [By Date] [Recent Entries]

  • To: John Heinstein <jheinstein@e...>, xml-dev@l...
  • Subject: Re: namespace URI of xmlns prefix
  • From: Mukul Gandhi <mukul_gandhi@y...>
  • Date: Fri, 15 Jul 2005 13:59:52 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=dCQh1HYQdQSO/4vwsYL8mQV9S1FdQIcjgGZ/N39BOcreyEDV9oSfd19z9BHQ+4e4uUsoR1CT9C/V30vI0zV0yxM8ih0UKnLi5nmMvlhu+eUUrBQAjGXLG3A5rDeY0YYs9JBAGn6n7iWIfphpqBT4GbQzFVGDunR8wSv+lW3ztGw= ;
  • In-reply-to: <42D809F0.7050501@e...>

--- John Heinstein <jheinstein@e...>
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 
 

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member