definition of validation including scopes and filters

Here is my take on defining SHACL validation.  This definition explicitly
considers scopes and filters.




An RDF data graph validates against a shapes graph if it validates against
all the shapes in the shapes graph.

An RDF data graph validates against a shape in a shapes graph whenever all
nodes in scope for the shape validate against the shape.  (So if a shape has
no scopes then it doesn't trigger any validation.)

A node is in scope for a shape whenever it is in any scope of the shape.

A node validates against a shape whenever it either does not validate
against some filter of the shape or it does validate against the
constraints of the shape.

A node validates against a constraint whenever it either does not validate
against some filter of the constraint or it does validate against the constraint.


Each kind of constraint has its own definition of which nodes validate
against it.  For SPARQL-based constraints this ends up being defined as
the query not producing an error-level violation for the node.



Each kind of scope has its own definition of which nodes are in it, roughly as
follows:

A node is in an individual scope iff it is the same as the scope.

A node is in a class scope iff there is an rdf:type/rdfs:subClassOf*
relationship between it and the scope.

A node is in a property scope iff ....

A node is in an inverse property scope iff ....

A node is in an all subjects scope iff it is the subject of a triple in the
graph.

A node is in an all objects scope iff it is the object of a triple in the
graph.

A node is in a SPARQL-based scope iff it is a node in the graph and the scope
query returns true on it.

Received on Friday, 8 January 2016 01:21:12 UTC