RDF-ISSUE-137 (aligning-trig-and-sparql): Should TriG be a subset of SPARQL Quad Pattern? [RDF TriG]

RDF-ISSUE-137 (aligning-trig-and-sparql): Should TriG be a subset of SPARQL Quad Pattern? [RDF TriG]

http://www.w3.org/2011/rdf-wg/track/issues/137

Raised by: Sandro Hawke
On product: RDF TriG

(Raised as per discussion at 2013-06-26 meeting)

TriG and SPARQL Quad Patterns *almost* overlap nicely, but there are two syntactic differences that make the languages entirely disjoint.

1.  SPARQL uses the GRAPH keyword before the graph name.  Traditional TriG doesn't.   We agreed to include the GRAPH keyword as an "at risk" feature, in parallel to PREFIX and BASE being "at risk".   One could argue that it automatically follows from accepting PREFIX and BASE into Turtle that we accepted GRAPH into TriG.   At very least the spec should include it, marked at risk. https://www.w3.org/2013/meeting/rdf-wg/2012-10-03#resolution_7

2.  SPARQL does not have curly braces around the default graph triples (although it kind of looks like it, since it has them around the whole quad pattern).  We decided that TriG would require them: https://www.w3.org/2013/meeting/rdf-wg/2012-10-17#resolution_2 ... but I don't think we were thinking about SPARQL compatibility at that point.   Also, at that point, the same bytes parsed as Turtle and TriG had different semantics, but since https://www.w3.org/2013/meeting/rdf-wg/2013-06-12#resolution_2 they now have the same semantics, so having overlapping syntaxes should be okay.   

PROPOSED:  Make TriG (not counting prefix & base) be a subset of the SPARQL quad pattern language, like Turtle is, by allowing (1) braces around the default graph and (2) the GRAPH keyword.  Explain that this form is preferred for SPARQL alignment, but isn't handled by older TriG parsers.

Received on Wednesday, 3 July 2013 02:24:47 UTC