W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

Re: xmlns attribute namespace

From: Ray Whitmer <rayw@netscape.com>
Date: Thu, 21 Dec 2000 09:57:24 -0800
Message-ID: <3A424484.8000601@netscape.com>
To: Garret Wilson <garret@globalmentor.com>
CC: Gareth Reakes <gareth@decisionsoft.com>, www-dom list <www-dom@w3.org>
Garret Wilson wrote:

> Thanks, Gareth.
> So in the example below, would that give xmlns a DOM Level 2 namespace URI
> of "" (the empty string) or null?
> Garret

No.  The unprefixed xmlns attribute is a special case which belongs to 
the same namespace URI as those prefixed with xmlns:.

This makes all namespace attributes belong to the same URI.

This presumes that there will never be a namespace attribute called 
"xmlns:xmlns", which would be indistinguishable by URI and local name.  
This seems to be a safe bet since you cannot use the xmlns prefix to 
address a namespace since it is reserved for declaring namespace 
prefixes and URIs.

Ray Whitmer
Received on Thursday, 21 December 2000 12:48:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC