W3C home > Mailing lists > Public > public-rdf-wg@w3.org > April 2011

Re: [TTL] Differences between SPARQL and Turtle.

From: Ivan Herman <ivan@w3.org>
Date: Sun, 24 Apr 2011 06:51:52 +0200
Message-Id: <E9B78E94-A6F8-42BF-8197-EF516FDCDB3C@w3.org>
Cc: Andy Seaborne <andy.seaborne@epimorphics.com>, "public-rdf-wg@w3.org" <public-rdf-wg@w3.org>
To: Eric Prud'hommeaux <eric@w3.org>
To be more general: is there any argument in any of the cases against _not_ to align Turtle on SPARQL? It strikes me that the SPARQL grammar has undergone quite some scrutiny at its definition, and the feedback on that grammar (eg, employee:12345) are pretty relevant for Turtle, too. The differences seem to be mostly minor, I do not see cases that would seriously break existing and deployed RDF serialized in Turtle...

My proposal would be to issue a Turtle FPWD with a complete alignment on SPARQL and see if the community would come up with "breaking" points...

(Would be good to declare victory on that one:-)

Ivan

----
Ivan Herman
Tel:+31 641044153
http://www.ivan-herman.net



On 23 Apr 2011, at 21:27, Eric Prud'hommeaux <eric@w3.org> wrote:

> * Andy Seaborne <andy.seaborne@epimorphics.com> [2011-04-23 17:33+0100]
>> (resent with note of ISSUE-1 for trackbot)
>> 
>> RDF-WG ISSUE-1
>> http://www.w3.org/2011/rdf-wg/track/issues/1
>> 
>> 
>> I've gathered the differences together into a live document
>> 
>> http://www.w3.org/2011/rdf-wg/wiki/Diff_SPARQL_Turtle#Relevant_RDF_WG_Decisions
>> 
>> 
>> And added a new one: Turtle and SPARQL treat \u escape processing
>> differently because they happen at different times in the parsing process.
> 
> +1
> 
> I've had a hard time defending the fact that one can't simply escape
> characters in PNames (SPARQL's QNames). This comes up in DB dumps, e.g.
> 
>  PREFIX p: <http://foo.example/db/People#> .
>  SELECT ?who ?dept WHERE {
>    ?who p:deptName\u002CdeptCity ?dept
>  }
> 
> SPARQL says \u002C is substituted with ',' *before* parsing (and ','
> isn't valid in local names).
> 
> We could potentially simplify the story for Turtle users by adding
> unicode escape sequences (I called them UCHARs) to qnames. I hacked
> this up in a grammar called turtleEsc http://w3.org/brief/MjM0 . It
> validates strings like:
> 
>  @prefix α: <http://foo.example/bar#> .
>  <ab\u00E9xy> \u03B1:p "ab\u0022cd" .
> 
> and is, IMO, pretty easy to explain to users. The downside is that
> we lose grammar control over folks adding chars like [<> ] to IRIs
> (i.e. left to semantic validation) but I believe it's still better
> than making PNames un-escapable.
> 
> 
>>    Andy
>> 
>> 
> 
> -- 
> -ericP
> 
Received on Sunday, 24 April 2011 04:50:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:41 GMT