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

RDF 2.0 Wishlist - Legal RDF which I can't SPARQL

From: Mischa Tuffield <mischa.tuffield@garlik.com>
Date: Thu, 29 Jul 2010 12:20:49 +0100
Message-Id: <CB0CBF48-ED5F-4A02-A0AA-5DF0F6D02548@garlik.com>
To: Semantic Web <semantic-web@w3.org>
Hi All, 

I know this is a known problem, but I have been bitten by the fact that there are legal RDF documents which I can't query using the SPARQL query language. And perhaps this should be looked at any future revision of RDF or SPARQL. 

The issue arises because turtle doesn't forbid the use of certain characters, for example the backtick " ` " (%60), where as SPARQL does forbid it. Which means that I can write legal turtle, import it into my triplestore, but I wont be able to ever query that data via SPARQL.

For example, the following turtle is legal : 

<http://example.com/mylamefoafdocument`uri> a foaf:Document . 
<http://example.com/mylamefoafdocument`uri> foaf:primaryTopic  <http://example.com/mylamefoafdocument`uri#me> .

But I cant write the following SPARQL query: 

SELECT * WHERE { <http://example.com/mylamefoafdocument`uri> ?p ?o}

I thought this was due to the fact that the RDF spec [1] was written before the RFC which defined URIs [2], but I can't find a link to an RDF spec which pre dates 1998.

My question is why does SPARQL forbid the use of certain URIs when the beauty of the web (from my POV) is that it kinda works, even if you use invalid URIs for documents, for example the following web document is real, it works, but I can't use it as a URI in parts of the RDF world.  

http://washington-press-release.com/41/Study%20Addresses%20`Cross-Selling`%20Within%20the%20Dating,%20Adult%20Dating%20Arena.php

I bring this up, because one of our applications needs to make statements about the above document, and I am now slightly tempted to encode such information as a literal value, something along the lines of : 

_:bnode0 a foo:WebDocument . 
_bnode0 foo:hasAddress "http://washington-press-release.com/41/Study%20Addresses%20`Cross-Selling`%20Within%20the%20Dating,%20Adult%20Dating%20Arena.php" .

Which is kinda rubbish from my POV.

My confusion lies in the following points:  

1) What is a URI reference, and what is the relationship between a URI reference and a URI as per [2], see : 
http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#ref-uris

2) My example of the backtick issue shows the incompatibility of turtle and sparql. From my reading RDFXML only points to section 2.1 of RFC2396 which doesn't forbid the backtick. Is it legal to use a backtick in an RDFXML URI?

Mischa 

[1] http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ (i know there was a 1999 one too)
[2] http://www.ietf.org/rfc/rfc2396.txt
___________________________________
Mischa Tuffield PhD
Email: mischa.tuffield@garlik.com
Homepage - http://mmt.me.uk/
Garlik Limited, 1-3 Halford Road, Richmond, TW10 6AW
+44(0)845 645 2824  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Thursday, 29 July 2010 11:21:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:42:21 UTC