W3C home > Mailing lists > Public > uri@w3.org > June 2003

Re: #foo URI references

From: Martin Duerst <duerst@w3.org>
Date: Mon, 30 Jun 2003 15:03:17 -0400
Message-Id: <4.2.0.58.J.20030630105056.048172b0@localhost>
To: Graham Klyne <GK@ninebynine.org>, Paul Grosso <pgrosso@arbortext.com>, uri@w3.org

I think I didn't give my whole story. I think what I said
below applies one specific use of base, which is quite
usual for HTML, but not for other uses.

Basically HTML <base> or xml:base can be used for two purposes:

1) To indicate the actual base URI of the current document.
    This is helpful in certain mirroring situations, in off-line
    editing/processing, and so on.
2) To indicate any kind of base to shorten URIs, completely
    independent of the original location of the current document.

In HTML, because there is only one <base>, usage 1) is often
predominant. But there are exceptions. For example I have used
<base> on a page with test links to the RDF validator
(see http://www.w3.org/2002/08/rdf-i18n-tests/). In that case,
<base> came in very handy to shorten the URIs, and even more
handy because it easily allowed to switch between a test instance
of the validator and the production instance without having to
change dozens of links.

For xml:base, the situation may be a bit different because
xml:base can be used repeatedly in an XML document. Also, we
have to take into account the (somewhat arbitrary) definition
of how xml:base interacts with external entities.

Both HTML and RDF mainly look at 1) when defining how they
want to behave fragments that refer to the current document.
And the two things they want to do, namely a) knowing what the
current document's original address was (RDF) and b) making
sure that there is no unnecessary retrieval operations (HTML)
are not in conflict as long as we are dealing with 1).

My guess is also that 2) is not really used with same-document
references. Definitely in my testing example, it wouldn't make
sense. Probably RDF could explicitly discourage the use of
xml:base for shortening URIs by recommending that suitable
namespace declarations can be used.

Regards,    Martin.


At 16:12 03/06/28 -0400, Martin Duerst wrote:

>At 18:42 03/06/27 +0100, Graham Klyne wrote:
>
>>In the opposite direction to your concerns, I find that the old 
>>same-document reference approach is problematic because there is *no way* 
>>to specify a fragment relative to the current base URI without also 
>>specifying part of the base URI.  (See also my comments at: 
>>http://www.apache.org/~fielding/uri/rev-2002/issues.html#017-rdf-fragment)
>>
>>I think the underlying problem is that this bit of syntax (i.e. bare 
>>#frag) is overloaded, and the most useful choice of functionality varies 
>>with the use.  Which suggests that a fix to satisfy everybody would 
>>require more syntax, but I don't know if that's a good idea, or even possible.
>
>'varies with use' does not automatically imply we need more syntax.
>The two uses we know are HTML-like, where it clearly is a same-document
>reference, and RDF-like, where it is treated as being relative to the
>relevant base. These uses should be distinguishable by context.
>And in both cases, there is no reloading of the document: In the
>HTML-like case, because it's a same-document reference and we already
>have the document, and in the RDF-like case because we can assume
>that the document is a copy of the one at the 'base' location, and
>therefore reload is unnecessary. So despite the differences, there
>is a lot of commonality.
>
>Regards,    Martin.
Received on Monday, 30 June 2003 15:03:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:31 GMT