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

Re: Issues found in Turtle spec

From: Eric Prud'hommeaux <eric@w3.org>
Date: Mon, 29 Aug 2011 17:12:46 -0400
To: Alex Hall <alexhall@revelytix.com>
Cc: Andy Seaborne <andy.seaborne@epimorphics.com>, public-rdf-wg@w3.org
Message-ID: <20110829211244.GB7387@w3.org>
* Alex Hall <alexhall@revelytix.com> [2011-08-29 16:49-0400]
> On Mon, Aug 29, 2011 at 4:42 PM, Andy Seaborne <
> andy.seaborne@epimorphics.com> wrote:
> 
> >
> >
> > On 29/08/11 21:36, Alex Hall wrote:
> >
> >> On Mon, Aug 29, 2011 at 4:03 PM, Gavin Carothers <gavin@topquadrant.com
> >> <mailto:gavin@topquadrant.com>**> wrote:
> >>
> >>     > The list example in section 6 uses a list on it's own, without a
> >>    predicate
> >>     > or object, which is not allowed by the grammar (neither is a
> >>     > blankNodeProperyList). Either the EBNF should be updated to allow
> >>    for these
> >>     > forms, or the examples should be changed such that ( ... ) and [
> >>    ... ] are
> >>     > used only in the context of being a subject or object. This
> >>    implementation
> >>     > will generate triples, however an error will be generated if the
> >>    parser is
> >>     > run in validation mode.
> >>
> >>    It seems likely that this is more of the same errors from above,
> >>    examples that are not valid Turtle should likely be removed from the
> >>    specification as just noting that they aren't valid doesn't seem to be
> >>    enough.
> >>
> >>
> >> This is a deviation from SPARQL, where collections and blank node
> >> property lists are allowed on their own in addition to as the subject or
> >> object of a triple.  Whether to amend Turtle to match the SPARQL
> >> definition in this respect is an open issue:
> >>
> >> http://www.w3.org/2011/rdf-wg/**track/issues/19<http://www.w3.org/2011/rdf-wg/track/issues/19>
> >>
> >> (This deals only with blank node property paths, but a resolution on
> >> this issue should also apply to collections).
> >>
> >> -Alex
> >>
> >
> > The SPARQL 1.1 Query last call document has note to allow removing
> > free-standing lists e.g. SELECT * { (1 ?x 3 4) . }
> >
> > See red box at:
> > http://www.w3.org/TR/sparql11-**query/#grammar<http://www.w3.org/TR/sparql11-query/#grammar>
> 
> 
> Thanks for pointing that out.  In that case the free-standing collection
> example should be removed from the Turtle draft.

I don't know where everything stands in terms of decisions about whether these abbreviations are in or out, but the last published Turtle grammar:
[1]  turtleDoc		::= statement*
[2]  statement		::= directive "." | triples "."
[6]  triples		::= subject predicateObjectList
[7]  predicateObjectList::= verb objectList ( ";" verb objectList )* (";")?
[10] subject		::= IRIref | blank
[14] blank		::= BlankNode | blankNodePropertyList | collection
[16] collection		::= "(" object* ")"
will whine if you don't give it a verb after a list (which is parsed as a subject):
  (1 2). # expected IRI_REF | "a" | PNAME_LN | PNAME_NS, got '.' at offset 5.


> -Alex

-- 
-ericP
Received on Monday, 29 August 2011 21:13:25 GMT

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