W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2004

RE: Incompatibilities in RDQL implementations

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Thu, 6 May 2004 13:31:41 +0100
Message-ID: <E864E95CB35C1C46B72FEA0626A2E808031A8F9B@0-mail-br1.hpl.hp.com>
To: Phil Dawes <pdawes@users.sourceforge.net>, www-rdf-interest@w3.org
Cc: "Seaborne, Andy" <andy.seaborne@hp.com>

And that's one of the reasons we have the RDF Data Access Working Group :-)

Jena's RDQL accepts all those forms.  Historically, commas and <> on qnames
(the qname-like prefixing mechanism) were required.  That got relaxed in
later versions.  I leave it to the query writer to decide what makes a query
readable - it is usally a matter of what they are used to.  If you write N3
a lot, <> on the qname-like constructs is odd.

Occasionally <> on qnames is needed to quote in characters (including
illegal ones because the underlying RDF has bad URIs in, including charset
mismatches).  I have tried to make Jena's implementation cover XML 1.1 names
and the queries are UTF-8 but there is data out there that is ISO-8859-XX
created etc.

Imy hope is that implementations are relaxed about what they accept.

My current test suite covers old and new syntactic forms for backwards

Check http://jena.hpl.hp.com/2003/07/query/ as later versions appear.


-------- Original Message --------
> From: www-rdf-interest-request@w3.org <>
> Date: 6 May 2004 10:48
> Hi All,
> I am currently writing wrapper code around Sesame[2] and RAP[3] to
> give them web interfaces corresponding to the Joseki webapi[4]. The
> point of the exercise is to be able to write web client code that is
> store agnostic. 
> Unfortunately there seem to be some incompatible variances in the way
> RDQL is implemented in the different RDF stores.
> For example, the W3C submission spec[1] (which was written after a lot
> of the implementations) says that qnames in 'where' clause
> triplepatterns are not surrounded by '<' and '>'.
> E.g. (example taken out of the W3C submission[1])
> (works with Jena/Joseki but not RAP or Sesame)
> SELECT ?family , ?given
> WHERE  (?vcard  vcard:FN "John Smith")
>        (?vcard  vcard:N  ?name)
>        (?name   vcard:Family  ?family)
>        (?name   vcard:Given  ?given)
> USING  vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
> Unfortunately both Sesame(1.0) and RAP(0.71) require '<' and '>'
> around qnames for the query to parse.
> E.g. (works with Jena and RAP, but not Sesame and isn't spec compliant)
> SELECT ?family , ?given
> WHERE  (?vcard  <vcard:FN> "John Smith")
>        (?vcard  <vcard:N>  ?name)
>        (?name   <vcard:Family>  ?family)
>        (?name   <vcard:Given>  ?given)
> USING  vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
> Also, Sesame requires commas between each triplepattern clause and
> between the triplepatterns themselves, RAP doesn't, and the spec says
> they're optional. 
> E.g. (works with Jena, RAP and Sesame, but isn't spec compliant)
> SELECT ?family , ?given
> WHERE  (?vcard,  <vcard:FN>, "John Smith"),
>        (?vcard,  <vcard:N>,  ?name),
>        (?name,   <vcard:Family>,  ?family),
>        (?name,   <vcard:Given>,  ?given)
> USING  vcard FOR <http://www.w3.org/2001/vcard-rdf/3.0#>
> So unfortunately writing an RDQL query that works with all three
> stores involves being incompatible with the spec!
> So the question is, should I be lobbying/helping the store vendors to
> fix the RDQL implementations WRT the W3C Submission (breaking existing
> client RDQL code in the process), or does the W3C submission need
> changing to match the implementations in the stores?
> Is there enough existing client RDQL code to be worrying about this?
> (we have 5 applications at work which would need changing, but the
> changes are trivial) 
> Many thanks,
> Phil
> [1] http://www.w3.org/Submission/2004/SUBM-RDQL-20040109/ [2]
> http://www.openrdf.org/ [3]
> http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/ [4]
> http://www.joseki.org/  
Received on Thursday, 6 May 2004 08:32:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:51 UTC