W3C home > Mailing lists > Public > semantic-web@w3.org > July 2005

Re: Relative URIs in xml:base - RDF/XML parser disagreement?

From: Dan Brickley <danbri@w3.org>
Date: Tue, 19 Jul 2005 10:48:23 +0100
Message-ID: <42DCCC67.909@w3.org>
To: Arjohn Kampman <arjohn.kampman@aduna.biz>
Cc: Jeremy Carroll <jjc@hplb.hpl.hp.com>, semantic-web@w3.org, dave.beckett@bristol.ac.uk

Arjohn Kampman wrote:

> Dan Brickley wrote:
>
>> RDF/XML parser owners: see below for a little test case that might 
>> flush out a
>> potential (if minor; this idiom isn't widely used) interop problem.
>
>
> Rio[1] also failed this test. A fix will be included in the 1.0.5
> release. Thanks for reporting this.
>
Thanks for the quick fix :)

> Our new implementation resolves relative base URIs against the base URI
> of the context. If the "root" xml:base directive contains a relative URI
> then it is resolved against the document URI. I guess this is the way to
> do it?

I'm not sure. Wondering if we might use the ESW Wiki to collect up some
more test-cases?

>>>> <?xml version="1.0"?>
>>>> <rdf:RDF xml:base="http://example.org/" 
>>>> xmlns:rdf="http://www.w3.org/1999/02/22-
>>>> rdf-syntax-ns#"
>>>>  xmlns:dc="http://purl.org/dc/elements/1.1/">
>>>>  <rdf:Description rdf:about="http://www.w3.org/" xml:base="test1/">
>>>>    <dc:title>World Wide Web Consortium</dc:title>
>>>>    <dc:source rdf:resource="test2/"/>
>>>>    <dc:relation rdf:resource=""/>
>>>>  </rdf:Description>
>>>> </rdf:RDF>
>>>
> [...]
>
>>>> ps. the dc:relation thing is in there because
>>>> http://lists.w3.org/Archives/Public/www-rdf-comments/2002JanMar/0234.html 
>>>> via
>>>> http://www.w3.org/2000/03/rdf-tracking/#rdfms-xml-base tells me 
>>>> that "" self-refs aren't
>>>> affected by xml:base. Not sure if that decision got reverted.
>>>
>
> Note that the response to this issue[2] states:
>   "The WG decided that RDF will convert such references to absolute
>   URI's and will take in scope xml:base attributes into account in such
>   conversions."
>
> The revised RDF/XML syntax spec[3] is in agreement with this:
>   "In RDF/XML, a fragment identifier is transformed into a RDF URI
>   reference by appending the fragment identifier to the in-scope base
>   URI. The empty string is transformed into an RDF URI reference by
>   substituting the in-scope base URI."
>
> Guess this means that self-refs /are/ affected by xml:base directives.


You're right (Dave also pointed this out, I should've trimmed my original
comment). I didn't read ahead carefully enough in that message!

I wonder how many other parsers are affected...

cheers,

Dan

> -- 
> Arjohn
>
>
> [1] http://www.openrdf.org/
> [2] 
> http://lists.w3.org/Archives/Public/www-rdf-comments/2002JanMar/0234.html
> [3] http://www.w3.org/TR/rdf-syntax-grammar/#section-baseURIs
Received on Tuesday, 19 July 2005 09:48:27 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:44:53 UTC