W3C home > Mailing lists > Public > xml-uri@w3.org > May 2000

Re: Namespaces and namespace names: a new synthesis?

From: John Cowan <cowan@locke.ccil.org>
Date: Sat, 27 May 100 03:51:08 -0400 (EDT)
Message-Id: <200005270751.DAA01415@locke.ccil.org>
To: masinter@attlabs.att.com (Larry Masinter)
Cc: xml-uri@w3.org
Larry Masinter scripsit:

Note that I was describing a specific *new* proposal, not trying to generate
a formal description of the existing mess.

> > 3) A URI which identifies a namespace can be constructed by prepending
> > "data:," to the namespace name.  (The namespace named "foo" has the URI
> > "data:,foo".  The namespace named "http://www.w3.org/2000/xyz" has the
> > URI "data:,http://www.w3.org/2000/xyz".)
> 
> Oh, no! That's nonsense. The only resource a data URI identifies is the
> data contained in the data URI.

Almost.  The *entity body* of a data URI is the characters and the
media type (text/plain by default) in the URI.  For example, if we
wanted to have resources for the lower-case letters of the ENglish
alphabet, it would be sensible to use "data:,a", "data:,b", ... "data:,z"
to identify those resources, since it would then not be necessary
to maintain entity bodies elsewhere.

By the same system, the URI "data:text/plain;charset=utf-8,%F2%98%A8"
refers to the Cross-of-Lorraine dingbat (like the "xx" in the Exxon logo,
titled 45 degrees left).

> Trying to say that a data URI can also
> be used to identify a resource is just nonsense.

Not at all, as I show above.

> If a namespace is a
> resource, then a URI must be used to identify it.

Exactly.  The namespace named "http://www.w3.org/2000/rdf-schema#"
has the URI "data:,http://www.w3.org/2000/rdf-schema%23".
Note the escaping of "#", because that is not a legal URI character,
a point I left out of my previous posting.

Axiom 3 is the core of my proposal.  I was trying to reconcile the positions
"a namespace name is just a string" (aka "literal") with "a namespace
is a resource" (aka "absolutize") by pointing out that although a 
namespace name has to look like a URI reference syntactically, it doesn't
have to be the case that the namespace is identified by the namespace
name considered as a URI reference!

(Boy howdy, that sentence wins a prize for explanations-that-don't-explain.
Let me try again.)

It occurred to me that the "absolutize" position, at its core, depended
on the axiom "Namespaces are resources", meaning that they have identity
and can be referenced by a URI.  However, there is nothing in that
axiom to say *what* the URI is.  Adherents of the "absolutize" position
have simply assumed that the URI is the absolute version of the namespace
name.

But what if it was some other URI altogether?

Nothing in the Namespace Rec rules out treating the namespace name
as a mere property of the namespace, and assigning a completely different
URI to identify the namespace.  In principle, some namespace could
have a name of "foo/bar" and a URI of "gopher://edu.com/76trombones".

In order to allow such flexibility, you would need to embed RDF support down
at the namespace level, a nightmarish confusion of levels.  So instead,
I propose this convention:

	if a namespace has a name property of "whatever",
	   where "whatever" matches the production "URIreference" in 2396,
	then it can be identified by the URI "data:,whatever",
	   where "whatever" has been properly URL-encoded.

Yes, it's a bit strange.  But it *works*.  Two namespaces are the same
if their namespace names are string-equal, which is what Namespaces
demands.  And yet every namespace is a resource.

> You have to define what it means for two namespaces to be "the same".
> There's no obvious, unique, equivalence relationship.

Um, okay.  N1 and N2 are the same namespace when, for every local-part L,
the element-types L-qualified-by-N1 and L-qualified-by-N2 are the same;
ditto for attribute names.  This might be subtly wrong: I am no formalist.

> > 7) Namespaces are declared in XML documents using their namespace
> > names (not their URIs).
> 
> This is the same thing you said before, I think. I'm not sure what it means
> when you say 'not their URIs' -- not the URI of the XML document, or
> not the URI of the namespace (which might not have a URI)

The latter.

> I can't live with using "data" URLs for a purpose so different than the
> one they were intended for; there are lots of problems with it.

I don't have the reference handy now, but someone on this list was
talking about what "the URI identifying a URI" would be, and a
data URI does the job nicely.  This is neatly analogous:  I use
the data: scheme to provide a URI that effectively identifies a name, where
the name happens to have the syntax of a URI reference.
This is a genuine third alternative to using the name *as* a URI reference
to provide the URI ("absolutize") or leaving the namespace name unconnected
with a reference ("literal").  (It's a fourth alternative if you count
the "forbid" option, which rules the problem out of existence by fiat.)

-- 
John Cowan                                   cowan@ccil.org
	Yes, I know the message date is bogus.  I can't help it.
		--me, on far too many occasions
Received on Saturday, 27 May 2000 03:27:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:32:43 UTC