RE: Namespaces and URIs

> -----Original Message-----
> From: ext Pierre-Antoine CHAMPIN [mailto:champin@bat710.univ-lyon1.fr]
> Sent: 08 June, 2001 17:07
> To: Patrick.Stickler@nokia.com
> Cc: www-rdf-interest@w3.org
> Subject: RE: Namespaces and URIs
> 
> 
> Patrick, I'm affraid you didn't get my point

My apologies. I'll try harder.

> On 08 Jun 2001 16:31:21 +0300, Patrick.Stickler@nokia.com wrote:
> > Having a single URI (URN) scheme such as "name:champin.y2001/foo",
> > requiring that all namespace names be instances of that scheme, and
> > defining an absolute, explicit, and reliable mapping algorithm
> > for deriving full URIs from namespace + name, certainly would 
> > go along way towards a solution.
> 
> I do not suggest that anyone use the same URI scheme to name their
> namespaces.
> The XML Namespaces recomendation works very well as is, as 
> far as it is
> concerned.

For namespaces and arbitrary XML applications, yes.

> The problem is RDF-related, when we try to *talk* about namespaces and
> qnames.

Agreed. We cannot reliably *know* what resources are meant by
a given qname and thus cannot reliably exchange knowledge
using namespace-based serialized XML instances.

> The mistake was, IMHO, to use the "namespace name" as the URI of the
> namespace;
> although namespace names are usually URIs, they are not *the* 
> URI of the
> namespace,
> but we could easily build such a URI, as I proposed...

Well, I don't necessarily agree with you there. If a URI is defined
as the namespace name, then I presume that that is the URI intended
to uniquely, persistently, and globally identify that namespace.

A Namespace name must be a URI (actually URI Reference, God help us),
so I don't see how you can have one URI that is the namespace name
and then another URI that is the namespace. They are the very same 
thing. No?

The problem is really that folks have been using the URLs of the
schemas defining serializations of abstract properties as the
namespace names (or hacking ways to resolve those namespace URLs
to schemas), confusing the fragment pointer syntax of the schema
MIME content type with how QNames should be mapped to the URIs of
those abstract properties within the RDF knowledge space.

If folks had used URNs as namespace names from the start, per the
explicit recommendation of the Namespace rec, then that confusion
might not have arisen and the problem of there being a total lack
of specification of how to consistently derive URIs from QNames
might have been more apparent sooner.

> 
> [about me being naughty]
> 
> > > 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 !
> > 
> > Insofar as the namespace spec is concerned, yes, you are a naughty
> > boy; not because the namespace is a URL (all the namespace 
> spec requires
> > is that the namespace name is some kind of URI, and it is 
> in your example)
> > but because you have identified *two* distinct resources with the 
> > same URI.
> 
> No I'm not:
> I use that "namespace name" (a character string) for one unique
> namespace, and always will;
> hence I respect the constraints of name and persistence.

Well, first, I can read the Namespace specs language of "unique" as
meaning more than unique just for namespaces, but I'll concede that
that is not clear. However, since a Namespace name must be a URI ref,
RFC2396 is reasonably clear that one URI identifies one resource,
not two. So if we consider a namespace a resource (albeit an abstract one)
then you have the same URI for two resources, the namespace and your
web page. So you're naughty ;-)

> 
> > Also, insofar as the semantics and behavior of the http:// URI 
> > (URL) scheme is concerned, you are IMO a naughty boy in using such
> > a URL as the name of what is intrinsicly an abstract resource.
> 
> No I'm not:
> as a URI, I use it to identify only my homepage.
> as a character string, I can use it for whatever I care ;)

But Namespace names are not just character strings. They are URIs and
the Namespace spec in essence relies on the URI required property
of uniqueness to ensure that those "strings" are unique.

> > Furthermore, insofar as RDF is concerned, IMO you also are 
> a naughty boy
> > because you have made it impossible to differentiate 
> between statements
> > made about your web page identified by the specified URL 
> and the namespace
> > identified by the *same* URL.
> 
> Because you take for granted that the *namespace name" I use, which
> happen to be *a* URI,
> is *the* URI for that namespace, which I argue is not true,
> and which is not specified as such in the [XMLNS] recommendation.

Really?  The spec says

"The [xmlns] attribute's value, a URI reference, is the namespace name 
identifying the namespace."

Just how would you specify some *other* URI as the URI of a namespace
if not the URI defined for the namespace name?

I must (still) not be following you.

The URI used for the namespace name *identifies* the namespace, it
doesn't merely render the namespace disjunct from other namespaces
(though it does do that). The URI is the identity of that namespace;
and most importantly, even if that namespace has some other identity
of some sort, even defined via a URI, the namespace name is the
*only* identity for that namespace that a parser will know and
thus the only basis for deriving full URIs for QNames for that
namespace.

> Since it is a custom to use URIs are "namespace names", 
> everybody found
> natural that those URIs should be the URIs of the 
> namespaces... I argue
> that this is not recomended by [XMLNS], and indeed should *not* be
> assumed.
> Wich lead me to my question:

I get the impression that you are confusing URLs with URIs.

I'm not advocating using URLs as namespace names. Quite the
contrary. URNs should be used. And of course both URLs and
URNs are URIs.

> > > So, what *is* the URI of the namespace ??
> 
> I meant *my* namespace, not *any* namespace in general...
> 
> > > 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.
> > 
> > Firstly, your second example is not a URI,
> 
> yes it is, it matches the opaque_part production rule, Annex 
> A of RFC2396.

Ahh. Sorry. I read your examples as xmlns=...

I see. You're proposing that there be a URI scheme 'xmlns', and
that all namespace names be instances of that URI scheme. Well,
that would only help matters if it had a reliable and explicit
mapping for all QNames into full URIs of the same scheme based
on the fusion of namespace name and name within namespace.

> > and namespace names must be valid URIs.
> 
> no they don't. They only have to be unique and persistent.
> see http://www.w3.org/TR/REC-xml-names/#ns-decl

Read the first part of the second paragraph of section 2, where it
explicitly
states it must be a URI reference.

It doesn't say "a URI reference *or* any other unique and persistent
string".
It is simply explaining that namespaces names must be unique and persistent,
most likely as a reason *why* it must be a URI.

Perhaps someone with hands-on knowledge of the spec could clarify this?

> > Secondly, whether you use URIs or any other *string* as
> > a context for names, you still need to map the namespace + name into
> > a consistent identity.
> 
> Right, but I was not adressing the "QName to URI" issue yet.
> Only the one of namespaces being abstract things, hence having a URN
> rather than a URI.

I think we're mostly in agreement, though there's some disconnect
in the language, I think. 

* Namespace names should be URNs, not URLs (names not locations).

* Names within namespaces should be URNs, not URL refs (names not 
  locations or fragments of data streams).

* URLs or URI refs should not be used to identify abstract resources.

That's one side of the problem.

The other side is:

* There must be a consistent mapping from QName to full URI for all
  pairs of namespace name plus QName.

* Having a single URN scheme (or small set of schemes) permitted to
  be used as namespace names would greatly simply solving this
  mapping problem.

Right?

Patrick

Received on Friday, 8 June 2001 10:43:54 UTC