Are *relative* URIs as namespace nemes considered harmful?

-----Original Message-----
From: Michael Champion <Mike.Champion@softwareag-usa.com>
>The gist of Tim's message seems to be that *absolute* URIs are at the very
>foundation of the Web and give it and the W3C specs much of their power.  I
>doubt if anyone seriously disagrees.

Good. I hope not! So I have split off this seperate question about relative
URIs.

>But *relative* URIs are only a
>convenience mechanism, and as often happens, their convenience hides their
>dangers.
>
>Allowing relative URI's in namespaces that must somehow get resolved back
to
>an absolute URI that may or may not point to a resource adds a fair amount
>of complexity to the specification and implementation of various
XML-related
>specs.

Well, the complexity if not that great. You have to call a function which
takes two strings as arguments and returns a string.   You do NOT have to go
on line or know anything about any URI schemes past or future.

The difficult bit is that you have to store the base URI with any document,
and you have to give an error when you absolutely need to absolutize a
relative URI and you have no base address. Note that the URI spec says there
should always be some a base address - in unix for example the file in the
current directory if there are just a bunch of files.

>(I *know* that the DOM WG has wrestled with the complexities of
>namespace prefixes, names, URIs, and presenting a useable interface to the
>user for much of the last year).  Furthermore, it entangles the IETF URI
>specs with various W3C constructs (XML, namespaces, xml:base, etc.) in ways
>that are difficult for even experts to fully comprehend.

The fact that URI is in IETF and XML is in W3C (which is the current state
while
history is much more complicated) doesn't affect the fact that the
combination
of markup and URIs (and internet protocols) is what makes the web work.
This "entangling" is crucial.  And perhaps it is hard for the experts, but
ordinatry web page writers have managed to get the hang of it for many
years.
Relative URIs are not IMHO complex.  Unix users use the same concept for
filenames all the time.  The fact is that some times, relative URIs are
going to be *more* stable.

A classic example is a document which defines its own namespace and uses it
as it goes along. I understood the WebCGM schema does that, refering to the
namespace it defines as "#".  Without relative URIs, this would be
impossible to do without always writing the URI of the document in it every
time you published a variation!

>  Finally, the end
>result is to give end users even more rope with which to hang themselves,
>ultimately decreasing the integrity of the Web in actual practice.


I am always suspicious of the argument that you are giving users enough rope
to hang themselves.  When the designer knows better than the user then alarm
bells go off.
Users are rashly using relative URIs all the time for links and embedded
images for example.
I don't expect that they would use them anything like so much with namespace
identifiers!  But it seems very arbitrary to just forbid them in this case.

(Unless the problem of keeping the base address with a document is really
insuperable,
but then all these oethr examples fail.)


>So the alternatives appear to be: to forbid relative URIs in namespaces,
>which seems arbitrary and inconsistent with various implementations out
>there already (most notably Microsoft's);

Agreed.

> or to rework the namespace spec to
>say that a "namespace name" is not a URI, just some string believed to be
>unique.



... or to just do it right.

I admit i could live with a solution in which relative URIs were banned, but
I would much prefer one which pointed out that you only use them when that
is what you mean, and that some
older XML software might occasionally get confused in doing validity
checking of your document.


>> It is really important for electronic
>> commerce and, indeed, the whole future of the web, that XML documents
>be
>> defined in terms of namespaces which are considered to identify the
>meaning
>> of the language they are written in.
>
>This is the very essence of the issue.  There is a widespread opinion that
>as a practical matter, in a world of less than perfectly understood specs
>and less than perfectly coded implementations, it is far easier to identify
>what a namespace REALLY means by making it completely specified by the
>namespace name without reference to the URI resolution mechanism.


I thought we were talking about relative URIs.  You can absoluteize a URI
without making any use of any dereferencing mechanism.   Maybe this is what
is not commonly understood. To dereference a relative URI is very *simple*.
One call. minimal CPU. No other resources. Just a function.

>Again, I claim no particular expertise here, just a desire to get the
>discussion going and this issue put to rest, one way or the other.


Thank you for your points.

Tim

Received on Monday, 15 May 2000 16:48:55 UTC