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

Turtle and SPARQL 1.1 last call

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Wed, 20 Apr 2011 09:38:17 +0100
Message-ID: <4DAE9B79.4050100@epimorphics.com>
To: rdf-wg <public-rdf-wg@w3.org>
The SPARQL WG plans to decide on Last Call in 2 weeks time, at it's 
telecon on Tuesday 3rd May.

There has been a desire that Turtle, SPARQL basic graph patterns and 
SPARQL Update triple descriptions align as much as possible.

Details of some differences below.

RDF-WG ISSUE-1
http://www.w3.org/2011/rdf-wg/track/issues/1

Recent RDF-WG decisions:

RESOLVED: close ISSUE-18 by requiring digits after the decimal point, as 
in "18.0"

RESOLVED: Allow dots inside local part and namespace part of qnames in 
Turtle, aligning with SPARQL syntax

     Andy
     on behalf of SPARQL-WG

SPARQL-WG action 440.
Bring Turtle/SPARQL incompatibility issues to the attention of RDF WG

-------------------------------------------------

Differences:
(This is not necessarily definitive.)

All these relate to SPARQL 1.0.
The SPARQL-WG is charterd to avoid changes to SPARQL 1.0 wherever possible.


1/ bNode property lists.

[ :p 1 ; :q 2 ]

is valid SPARQL, including SPARQL 1.0, but not Turtle (and is legal in 
N3) - in Turtle only explicit subject forms are legal.

Turtle allows forms like:

[] :p 1 ; :q 2 .

[ :p 1 ] :q 2 .

Legal SPARQL:

INSERT DATA
{
   [  :p 1 ; :q 2 ] .  See also the matter of double

   [  :p 3 ; :q 4 ]
}

SELECT * { [ :p 1 ; :q 2 ] }

even

SELECT * { [ :p 1 ; :q 2 ] a rdf:Resource }


2/ A less frequent case is a free-standing lists and subject lists.

(1 2 3 4) .

SELECT * { (1 ?x 3 4) . }

SELECT * { (1 2) rdfs:comment "List" }

Turtle allows

(1 2 3 4) rdfs:comment "List" .
but not
(1 2 3 4) .


3/ Trailing dots

A final DOT is not required in SPARQL:

INSERT DATA { :s :p :o }

SELECT *
WHERE
{
    ?z a foaf:Person ;
       foaf:name ?name ;
       foaf:knows [ foaf:name ?name2 ]
}

This is more significant when TriG is considered.


4/ Strings

Using ' and ''' for string quoting is legal in SPARQL.
Because SPARQL queries can be embedded in programs, allowing a character 
that does not require programming language quoting is useful.


5/ Local part of prefix names can begin with a number.

This was a change made to SPARQL during the per-LC development phase due 
to user feedback.  Groups found that it was inconvenient in situations 
where all numeric identifiers from non-RDF data arose naturally

e.g.

employee:00154337
Received on Wednesday, 20 April 2011 08:39:05 GMT

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