Re: definition of validation including scopes and filters

SHACL spec links and abstract excerpt

SHACL
======

* | Spec: http://www.w3.org/TR/shacl/
* | Spec: http://www.w3.org/TR/2015/WD-shacl-20151008/
* | Spec: https://w3c.github.io/data-shapes/shacl/
* | Docs: http://www.w3.org/2014/data-shapes/wiki

  RDF Data Shapes Working Group

abstract from http://w3c.github.io/data-shapes/shacl/ :
```
Shapes Constraint Language (SHACL)
W3C Editor's Draft 07 January 2016

Abstract

SHACL (Shapes Constraint Language) is a language for describing and
constraining the contents of RDF graphs. SHACL groups these descriptions
and constraints into "shapes", which specify conditions that apply at a
given RDF node. Shapes provide a high-level vocabulary to identify
predicates and their associated cardinalities, datatypes and other
constraints. Additional constraints can be associated with shapes using
SPARQL and similar extension languages. These extension languages can also
be used to define new high-level vocabulary terms. SHACL shapes can be used
to communicate information about data structures associated with some
process or interface, generate or validate data, or drive user interfaces.
This document defines the SHACL language and its underlying semantics.
…
On Jan 7, 2016 3:11 PM, "Peter F. Patel-Schneider" <pfpschneider@gmail.com>
wrote:

> 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:19:19 UTC