Re: URI versus URI Reference

John Cowan wrote:

> Paul W. Abrahams scripsit:
> >
> > It would be useful if someone could explain the distinction
> > between a URI and a URI reference.  Or is it a distinction
> > without a difference?
>
> Not at all. URIs have to be absolute, and can't include a
> fragment-id (begins with "#").  URI references can be
> relative or absolute and can include a fragment-id.

I don't think that RFC2396 actually says that a URI has to be
absolute.  A URI has to identify a resource, but RFC2396 nowhere
says explicitly that the identification has to be
context-independent.    But to say that a URI has to be absolute
also runs up against the existence in RFC2396 of the nonterminal
relativeURI (defined in Sec. 5) and the fact that Section 3 speaks
of absolute URIs.   I suppose one could argue that a relativeURI
isn't a URI at all, but that's certainly counterintuitive.  And why
would Section 3 have to refer to absolute URIs if there aren't any
other kinds of URIs?

There's also the fact that in programming languages, ref x is not
the same as x, not even syntactically (modulo implicit
dereferencing, of course).   One would expect a URI reference to be
a pointer to a URI, i.e., a doubly indirect specification of a
resource, and not some generalization or specialization of a URI.
(Not that I can see much use for such a construct.)

Here's what I really think is going on.  RFC 2396 made some
ill-thought-out terminological choices.  It would have been far
simpler not to speak of URI references at all, and to replace the
first syntax rule in Section 4 by:

    URI = [absoluteURI | relativeURI] ["#" fragment]

which is all right since RFC2396 doesn't have a syntax rule for
URI.

But RFC2396 isn't going to be changed, so W3C spec writers have to
live with its mistakes.  The namespace spec needs to define a
namespace name as a URI reference because that's the term used in
RFC2396.  But it could reword the definition slightly (albeit at
the cost of offending folks in IETF) to say:

[Definition] The attribute's value is the namespace name
identifying the namespace.  That name is a URI, i.e., a URI
reference in the sense of RFC2396.

Of course, that says nothing about the absolute versus relative
issue.

Paul Abrahams

Received on Wednesday, 24 May 2000 14:16:32 UTC