Warning:
This wiki has been archived and is now read-only.
PRFO4
This is a formal objection to the SHACL definition of pre-binding.
Submitted by: Peter Patel-Schneider
Description of the issue
Submitter objects to the fact that the definition of pre-binding excludes certain SPARQL queries. He believes that the WG must formulate a definition of pre-binding that would allow any SPARQL query to be used.
He further states that in some cases exclusions specified in the spec are too broad, excluding some queries that are not problematic given the current definition of pre-binding.
Relevant information
In a subsequent e-mail submitter offered an alternative definition of pre-binding.
WG Response
While the WG was not able to create a definition of pre-binding that would not exclude some features of SPARQL, it was able to keep the limitations to a minimum and to define them precisely.
As a result, SHACL places only a few restrictions on the allowed SPARQL queries. The following keywords are not allowed:
- SERVICE - it represents a security risk
- VALUES - while this excludes some queries, the main use case for VALUES is to be used together with SERVICE
- MINUS - while this excludes some queries, some of them could be reformulated without the use of MINUS
The only other requirements are:
- Pre-bound variables should not be re-bound by the query
- Sub-selects should return all pre-bound variables - this stipulation doesn't limit the logic of the query
All other features of SPARQL 1.1 can be used. SHACL-SPARQL engines are required to check for the disallowed features.
An alternative pre-binding definition proposal from Peter Patel-Schneider has even greater limitations, excluding many very typical query patterns. For example, it would exclude any sub-selects and any query that combines UNION with FILTER - see WG response email.