w3c / rdf-tests

Repository for the RDF Tests Community Group
w3c.github.io/rdf-tests
Other
44 stars 23 forks source link

SPARQL syntax test classes in test manifest vocabulary include version in IRI (`11`) #143

Open rubensworks opened 6 days ago

rubensworks commented 6 days ago

The test manifest vocabulary introduces the following:

:PositiveSyntaxTest11 rdf:type rdfs:Class ;
      rdfs:label "Positive Syntax Test for SPARQL1.1 Query" ;
      rdfs:comment "A type of test specifically for syntax testing of new features in the SPARQL1.1 Query Language. Syntax tests are not required to have an associated result, only an action." .

:PositiveUpdateSyntaxTest11 rdf:type rdfs:Class ;
      rdfs:label "Positive Syntax Test for SPARQL1.1 Update" ;
      rdfs:comment "A type of test specifically for syntax testing of SPARQL1.1 Update. Syntax tests are not required to have an associated result, only an action." .

:NegativeSyntaxTest11 rdf:type rdfs:Class ;
      rdfs:label "Negative Syntax Test for SPARQL1.1 Query" ;
      rdfs:comment "A type of test specifically for syntax testing of new features in the SPARQL1.1 Query Language. Syntax tests are not required to have an associated result, only an action. Negative syntax tests are tests of which the result should be a parser error." .

:NegativeUpdateSyntaxTest11 rdf:type rdfs:Class ;
      rdfs:label "Negative Syntax Test for SPARQL1.1 Update" ;
      rdfs:comment "A type of test specifically for syntax testing of SPARQL1.1 Update. Syntax tests are not required to have an associated result, only an action. Negative syntax tests are tests of which the result should be a parser error." .

This means that the test classes are hardcoded to SPARQL 1.1, which is inconsistent with the test classes for RDF syntaxes (PositiveSyntaxTest and NegativeSyntaxTest), which do not include such a version label.

In order to add new syntax tests for SPARQL 1.2, we can either

  1. broaden the usage of the SPARQL test classes, and keep using classes such as PositiveSyntaxTest11 for SPARQL 1.2, or
  2. introduce PositiveSyntaxTestSparql and variants into the vocabulary, and deprecate PositiveSyntaxTest11 and variants.

Option 2 seems like the cleanest option to me.

afs commented 5 days ago

For completeness, there is a "3":

  1. Add a PositiveSyntaxTest12 and related names.

Note: In PositiveSyntaxTestSparql - the 'Sparql' is redundant because the namespace is http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# ("DataAccess" being the SPARQl 1.0 WG name) and also distinguishing 1.1 vs 1.2 is by file path name.

IMO find saying "SPARQL 1.1" when it is SPARQL 1.2 a bit misleading.

(3) is slightly more preferable; (2) is OK.

Apache Jena has separate parsers for versions of SPARQL (1.0, 1.1. and now 1.2). I don't recall any feedback about their usage. The default is SPARQL+extensions. All extensions are additions and do not change/invalidate any standard SPARQL syntax.