Re: Turtle and predicate object lists.

* 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 UTC