Re: Request to name the "no namespace" namespace

fantasai scripsit:

> This is a request from a somewhat exasperated CSS Namespaces [1] editor.
> Can you please assign the "no namespace" namespace a name? It's very hard
> to talk about it and make conformance requirements that involve it when
> it doesn't have a name.

The XML Core WG discussed the matter last week, and our feeling is
that we can't give this namespace a name, because it does not exist:
when elements are not in a namespace, it is not because they are in a
"no namespace" namespace, or a nameless namespace, but because there
does not exist any namespace which in fact contains them.

This means that one must sometimes write annoying parenthetical remarks
like "The output element is in the same namespace as the input element
(or, if the input element is not in a namespace, the output element is
not either)."  This is just one of those things that makes writing a
spec challenging and fun.  

More broadly, for us to write a new spec proclaiming that the elements
formerly described as being in no namespace are now actually in a
namespace after all would be productive of nothing but headaches and
confusion.  We got in enough trouble, as you may recall, for retroactively
proclaiming a namespace name for the "xmlns" namespace.

> (Bonus points for explicitly associating it with the empty string --
> explaining how the empty string represents it while keeping it distinct
> from the idea of an empty string namespace name is also difficult.)

Unfortunately, that is highly API-dependent.  Some APIs use the empty
string as a representation of the nonexistent namespace of an element, but
others use the C or Java null instead, and both positions are legitimate.

Additionally, "" is not a legitimate namespace name, because a namespace name
is a URI, and "" is not a valid URI according to the grammar in RFC 3986.
It is a legitimate value for an "xmlns" attribute, but that's another thing.

We hope these explanations are helpful, if not as helpful as you had hoped.

-- 
John Cowan  http://ccil.org/~cowan    cowan@ccil.org
There are books that are at once excellent and boring.  Those that at
once leap to the mind are Thoreau's Walden, Emerson's Essays, George
Eliot's Adam Bede, and Landor's Dialogues.  --Somerset Maugham

Received on Tuesday, 29 April 2008 16:19:37 UTC