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="" 
>>> xmlns:rdf="
>>> rdf-syntax-ns#"
>>>  xmlns:dc="">
>>>  <rdf:Description rdf:about="" 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
>>> via
>>> 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

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.



Received on Tuesday, 19 July 2005 09:36:16 UTC