Re: xmlns attribute namespace

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
rayw@xmission.com

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