Re: update to SHACL-SPARQL (ISSUE-62)

On 5/31/2015 0:26, Peter F. Patel-Schneider wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> To make selection by expression work well, the translations to SPARQL need
> to be adjusted to make most of them binding.  I have done so for
> https://www.w3.org/2014/data-shapes/wiki/Shacl-sparql
>
> As I also state in https://www.w3.org/2014/data-shapes/wiki/Shacl-sparql it
> is possible to do away with the need for binding by adding some SPARQL that
> binds against all nodes in an RDF graph.

The latter is basically what I suggest too, only that I would make this 
fact more explicit. In my suggested design, people would associate their 
shapes with rdfs:Resource to state that they apply to all resources. (We 
can discuss whether this means everything with an rdf:type statement or 
every subject in the graph, but that doesn't matter too much). This 
ensures that ?this will always be bound, but doesn't prescribe how an 
engine implements this: if the constraint already binding then it 
doesn't need to add the ?this a rdfs:Resource clause prior to execution, 
leading to exactly the same situation as in your approach.

However, I believe my approach is cleaner because it handles every case 
consistently, without having to specify some algorithms that explain in 
detail how to determine whether a SPARQL query is already binding, and 
how to inject a binding clause otherwise. It is also more consistent for 
the case when you invoke the engine to validate a single resource - it 
would simply walk up the class hierarchy to collect all relevant 
constraints and wouldn't need to look into some global constraint 
objects outside of the tree.

Overall I really wonder what use cases would not be covered by my design 
but yours... We had discussed before that other communities may define 
their own shape selectors anyway.

Holger

Received on Monday, 1 June 2015 06:14:18 UTC