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

On Mon, 2005-07-18 at 11:36 +0100, Dan Brickley wrote:
> Hi
> 
> <?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>
> 
> 
> ...is a test of xml:base stacking with relative URIs.
> 
> I tried the online Raptor service, and got:
> 
> http://www.w3.org/     http://purl.org/dc/elements/1.1/relation     
> http://example.org/test1/
> http://www.w3.org/     http://purl.org/dc/elements/1.1/source     
> http://example.org/test1/test2/
> http://www.w3.org/     http://purl.org/dc/elements/1.1/title     World 
> Wide Web Consortium
> 
> I tried latest ARP download on commandline, and got:
> 
> Warning: 
> file:///Users/danbri/Desktop/jena/Jena-2.2/../xmlbase1.rdf[4:69]: {W107} 
> Bad URI <test1/>: No scheme found in URI 'test1/'
> <http://www.w3.org/> <http://purl.org/dc/elements/1.1/title> "World Wide 
> Web Consortium" .
> <http://www.w3.org/> <http://purl.org/dc/elements/1.1/source> 
> <file:///Users/danbri/Desktop/jena/test2/> .
> <http://www.w3.org/> <http://purl.org/dc/elements/1.1/relation> 
> <file:///Users/danbri/Desktop/jena/Jena-2.2/../xmlbase1.rdf> .
> 
> The test case is basically an RDFization of the example in 
> http://www.w3.org/TR/xmlbase/#syntax
> (tried out of curiosity after a thread on the atom-syntax list).

Reading the XML Base spec, yes it seems it can be stacked although my
vague memory of RDF Core discussions was that it always had to be
absolute.  Seems I implemented it after the spec rather than my memory.

> http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-ID-xml-base 
> doesn't seem to
> require absolute URIs in RDF's treatment of xml:base, nor rule out the 
> stacking behaviour.
> 
> So from a quick look I'd guess that ARP is in error, rather than Raptor. 

It seems so, however I've never known ARP to be wrong so I'm cautious.


> This is a somewhat
> obscure corner-case so I expect other parsers might also vary in 
> behaviour...
> 
> Thoughts?
> 
> Dan
> 
> 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.
> http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/ has a good set of 
> xmlbase tests
> but it doesn't seem to exercise this possibility (of multiple xml:base, 
> some relative).

That decision actually shows the opposite and includes an example of
xml:base affecting rdf:about="" in the issue.

Dave

Received on Monday, 18 July 2005 11:33:19 UTC