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

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.

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?

>>> <?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.

--
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:36:16 UTC