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

Re: Turtle and predicate object lists.

From: Eric Prud'hommeaux <eric@w3.org>
Date: Mon, 14 May 2012 15:35:06 -0400
To: Andy Seaborne <andy.seaborne@epimorphics.com>
Cc: RDF-WG <public-rdf-wg@w3.org>
Message-ID: <20120514193447.GE11298@w3.org>
* 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>

> 	Andy
> 

-- 
-ericP
Received on Monday, 14 May 2012 19:35:37 GMT

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