W3C home > Mailing lists > Public > uri@w3.org > January 2002

Re: Base URIs vs. Document URIs.

From: Al Gilman <asgilman@iamdigex.net>
Date: Fri, 11 Jan 2002 12:11:00 -0500
Message-Id: <Version.32.20020111120011.03fdaa30@pop.iamdigex.net>
To: "Jason Diamond" <jason@injektilo.org>, <uri@w3.org>
At 11:46 AM 2002-01-11 , Jason Diamond wrote:
>Thanks, Paul.
>
>> >Is there any way to resolve something like "#s" against the base URI and
>not
>> >the document URI?
>>
>> I'd suggest that you shouldn't be calling resolveURI at all in the case
>> that the relative URI reference is merely a fragment identifier.  There
>> is nothing to resolve.
>
>I need some function that accepts a URI reference and returns a URI. If you
>know of a more appropriate name than resolveURI then I would be happy to use
>it. I only chose resolveURI since Appendix C uses the term resolve and it
>includes the example of the URI reference "#s".
>
>I only asked the question out of pure curiosity--I don't think I would ever
>need to do it.
>
>But just so I understand, let's say that my document URI is
><<http://example.org/document.xml>http://example.org/document.xml> 

'Document URI' is your term and not defined in the standard notions.

This is the URI by/with/from which you recovered a representation which
asserts
a BASE at:

and my base URI is
><<http://example.org/base.xml>http://example.org/base.xml> and I want to
resolve to

You want to refer to ...

><<http://example.org/base.xml#fragment>http://example.org/base.xml#fragment>,
the only URI reference that I can
>think of that would get me what I want is <base.xml#fragment> 

The _minimum_ URL-reference you can...

>because if I
>used <#fragment>, it would get resolved to
><<http://example.org/document.xml#fragment>http://example.org/document.xml
#fragment>. Is this correct?

The latter is correct.

Other, longer URI-references work, too, starting with
"/base.xml#fragment".  So
it's not the only URI-reference you can use.  

And '.' doesn't work for _ibid_ for documents, just for path segments.  And in
the case you have painted here where the historical URI and base URI are
different, 'ibid' would be ambiguous.  So the lexically shorter form is bound
to the more local resolution, as is fitting.

Al

>I really appreciate your helping me to understand these issues!
>
>Jason.
>  
Received on Friday, 11 January 2002 12:11:10 GMT

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