Namespaces and URIs

I'm wondering if we are not deeply misleading with the Namespace URI
debate...

According to [XMLNS], the *namespace name* has to be unique and
persistent, period. Then (and ONLY then) they suggest the use of URNs,
or possibly any URI. As a matter of fact, URIs are a (supposedly)
efficient and easy way to guarantee uniqueness and persistence.

Uniqueness and persistance allow the namespace name to *identify* the
namespace. But that does not mean that it has to be the URI of the
namespace. Indeed, it does not have to be a URI *at all* !

Still, though the *namespace name* identifies the namespace in this
respect, it does so only because it is unique and persistent *as a
namespace name*, NOT because it is a URI. Let's explain that subtilty
with an example.


Suppose I want to publish an XML namespace. I happen to own the unique
and peristent domain 'champin.y2001' (see [1]), and the URL
http://champin.y2001/ happens to identify my homepage.

I could very well decide to use that same URL as a namespace name for my
XML namepspace.
I am quite sure I won't publish another namespace during the year 2001,
so the URL is as simple as can be.

Does this mean that the URL does not identify my homepage anymore ? no.
Does this mean I'm a naughty boy, using the same URI for 2 distinct
things ? no, I argue:
- I use it as a URI identifying my homepage
- I use it as a unique and persistent string to identify my namespace
I could even have used the string "champin.y2001" for the namespace !



So, what *is* the URI of the namespace ??
AFAIK, there is none defined for the moment. An immediate solution would
be
    xmlns:http://champin.y2001/
    xmlns:champin.y2001
where 'xmlns:' is a URI scheme, even URN I think.
Let's be clear: the xmlns attributes do not have to contain the "xmlns:"
prefix ! Why should they, by the way... they clearly define a context
where the *string* has to be interpreted as a 'xmlns:' URI.


I am sure we could solve the concatenation issue, quite the same way,
either by creating a 'qname:' URI scheme or by extending the 'xmlns:'
scheme in order to include an optionnal element name.

I am also sure I'm not the first one to make that kind of proposition.
However I could not remember who else, nor what reason were objected so
that the whole world is not using it now :) Please refresh my memory if
so.

  Pierre-Antoine


[XMLNS] http://www.w3.org/TR/1999/REC-xml-names-19990114/
[1] http://www.w3.org/DesignIssues/PersistentDomains

Received on Friday, 8 June 2001 08:47:00 UTC