- From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
 - Date: Thu, 8 Dec 2016 18:46:13 -0800
 - To: "public-rdf-shapes@w3.org" <public-rdf-shapes@w3.org>
 
There are several places where the textual definition of validation differs
from the SPARQL definition.
Consider, for example the shapes graph
se:s1 rdf:type sh:Shape ;
 sh:targetNode ex:n ;
 sh:property [ sh:predicate ex:p ;
               sh:class ex:c ] .
and the data graph
ex:n ex:p ex:m .
ex:m rdf:type ex:c ;
  ex:p ex:l .
According to the textual definition of sh:ClassConstraintComponent this data
graph conforms to this shapes graph as no validation result is produced for
ex:n because its sole value for ex:p is a SHACL instance of ex:c in the data
graph.
The SPARQL definition here uses the following SPARQL query
SELECT DISTINCT $this ?value
WHERE {
  $this ex:p ?value .
  FILTER NOT EXISTS
    { $value rdf:type/rdfs:subClassOf* $class . }
  }
with this pre-bound to ex:n and class pre-bound to ex:c.
According to the SHACL document
evaluating this SPARQL query will produce a non-empty solution sequence,
namely
  { { (this, ex:m), (value,ex:l) } }
because
  $this ex:p ?value .
will produce the set of solutions
  { { (this, ex:n), (value,ex:m) } ,
    { (this, ex:m), (value,ex:l) } }
Therefore according to the SPARQL definition of sh:ClassConstraintComponent
this data graph does not conform to this shapes graph.
>>>>>>>>>>>>>>>>>>ISSUE<<<<<<<<<<<<<<<<<<<<<<<<
The textual and SPARQL definitions conflict in several places.  One or the
other needs to be fixed or dropped.
>>>>>>>>>>>>>>>>>>ISSUE<<<<<<<<<<<<<<<<<<<<<<<<
Peter F. Patel-Schneider
Nuance Communications
Received on Friday, 9 December 2016 02:46:50 UTC