Zachary Whitley
Zachary Whitley

Reputation: 35

Is SPARQL 1.0 a subset of SPARQL 1.1

Is SPARQL 1.0 a subset of SPARQL 1.1? I suspect that it is. I'm asking because the SPARQL 1.1 grammar isn't written an extension of the 1.0 grammmar. There is obviously a lot of overlap between the two definitions with 1.1 adding grammar rules for the new features but there are other parts that are not shared between the two. If 1.0 is a subset of 1.1 is there a particular reason that it isn't written that way? I would like to create a unified grammar that supports SPARQL 1.0 and SPARQL 1.1 parsing.

Upvotes: 1

Views: 366

Answers (2)

Gregory Williams
Gregory Williams

Reputation: 466

I believe in at least one case compatibility with SPARQL 1.0 was broken: in the parsing of the DECIMAL production, SPARQL 1.0 allowed things like 123. while SPARQL 1.1 requires at least one digit after the dot (123.0).

Upvotes: 1

cygri
cygri

Reputation: 9482

I believe that every valid SPARQL 1.0 query is also a valid SPARQL 1.1 query, but couldn't swear to it.

Some queries will have different results due to the differences between RDF 1.0 and RDF 1.1 (unification of simple literals and xsd:string; introduction of rdf:langString).

The grammar of SPARQL 1.1 supports both Query and Update. That, plus the introduction of many new features in 1.1 Query, may have necessitated some refactoring in the grammar.

Upvotes: 2

Related Questions