W3C home > Mailing lists > Public > www-archive@w3.org > July 2005

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

From: Dan Brickley <danbri@w3.org>
Date: Mon, 18 Jul 2005 11:36:06 +0100
Message-ID: <42DB8616.1030502@w3.org>
To: www-archive@w3.org, jjc@hplb.hpl.hp.com, dave.beckett@bristol.ac.uk

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

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


Received on Monday, 18 July 2005 10:47:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:17:52 GMT