W3C home > Mailing lists > Public > public-rdf-wg@w3.org > May 2012

Re: Turtle and predicate object lists.

From: Alex Hall <alexhall@revelytix.com>
Date: Mon, 14 May 2012 18:40:00 -0400
Message-ID: <CAFq2biw-HUGhzZ8Wq_TzB+JkF3=Qx41p2HFi5snBG=tXPrdAEg@mail.gmail.com>
To: "Eric Prud'hommeaux" <eric@w3.org>
Cc: Andy Seaborne <andy.seaborne@epimorphics.com>, RDF-WG <public-rdf-wg@w3.org>
On Mon, May 14, 2012 at 3:35 PM, Eric Prud'hommeaux <eric@w3.org> wrote:

> * Andy Seaborne <andy.seaborne@epimorphics.com> [2012-05-14 20:04+0100]
> > A difference between Turtle and SPARQL.
> >
> > Turtle does not support top-level blank-predicate-object lists.
> > SPARQL does.
> >
> > [
> >    foaf:name "Name" ;
> >    foaf:knows <http://example/another>
> > ] .
> >
> > but Turtle does allow:
> >
> > [
> >   foaf:name "Name"
> > ] foaf:knows <http://example/another> .
> >
> > This could be accommodated with two grammar rule changes:
> >
> >
> > [6] triples  ::=  subject predicateObjectList
> > ==>
> > [6] triples  ::=
> >    (subject predicateObjectList) |
> >    (blankNodePropertyList predicateObjectList?)
> >
> >
> > [10]  subject         ::=     iri | blank
> > ==>
> > [10]  subject         ::=     iri
> >
> > See
> > http://www.w3.org/2005/01/yacker/uploads/turtleWithBlankNodePropertyList
>
> Note that this grammar does not permit this wierd document: "[].", in
> case that was causing you hesitation. I think this change aligns us
> more closely with SPARQL and will reduce the number of users who
> scratch their heads trying to figure out why removing the last
> predicte object from " [ a <P> ] a <Q> . " would make the document
> invalid.
>

+1
>
> Here's a demo of Andy's grammar:
>  <http://w3.org/brief/MjYx>
>
>
This is ISSUE-19 (http://www.w3.org/2011/rdf-wg/track/issues/19) and was
discussed some on the mailing list 13 months (!) ago and subsequently
closed as a duplicate of ISSUE-1. If memory serves, there was some pushback
at the time on allowing it in Turtle but that might have been overridden by
SPARQL alignment concerns.

Alex



> >       Andy
> >
>
> --
> -ericP
>
>
Received on Monday, 14 May 2012 22:40:50 GMT

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