Re: nomenclature in current document - ISSUE-65

Here is my current preferred nomenclature.  This has been excerpted from
https://www.w3.org/2014/data-shapes/wiki/Shacl-sparql with minor changes
(Core->Global, Extended->Scoped) and rearranged into a form that emphasizes
the nomenclature.  Several details from the original account have been
elided.

This only covers nomenclature and some high-level aspects of syntax and
validation.  There is not just a change in naming of things from
http://w3c.github.io/data-shapes/shacl/ but also differences in how shapes
and constraints are put together and in how validation works.




SHACL constraints:

Some SHACL constraints separate a constraint into a scope section and a
shape section. These SHACL constraints, called SHACL Scoped Constraints,
must have precisely one scope section and one or more shape sections.  Both
the scope section and the shape sections are SHACL shapes.

Other SHACL constraints have instead a SPARQL query and are called SHACL
Global Constraints.

All SHACL constraints have as well a severity level.


SHACL shapes:

There are multiple kinds of SHACL shapes, each with different syntax.  Some
SHACL shapes have a component that is another SHACL shape.


Validating a SHACL shape against a node in an RDF graph (in an RDF dataset):

The result of validating a SHACL shape against a node in an RDF graph (in an
RDF dataset) is zero or more shape violations.  If no violations are in the
result then the validation succeeded, otherwise it failed.

The different kinds of SHACL shapes each place different requirements on the
"shape" of an RDF graph in the neighbourhood of the node.  The SHACL shapes
that have a component that is another SHACL shape generally succeed or fail
based on whether validating this other shape on one or more nodes in the
graph succeeds or fails.


Validating a SHACL Scoped Constraint:

A SHACL scoped constraint is validated against an RDF graph (in an RDF
dataset) by first determining for which non-literal nodes in the graph the
constraint's scope succeeds.  Then each of the constraint's shapes are
validated against each of these nodes.  The validation succeeds as a whole
if each of these validations succeed and fails otherwise.


Validating a SHACL Global Constraint:

A SHACL Global constraint is validated against an RDF graph (in an RDF
dataset) by evaluating its query against the graph (in the dataset).  If the
query result is empty the validation succeeds and otherwise it fails.


Validating a SHACL constraint graph against an RDF graph (in an RDF dataset):

A SHACL engine takes as arguments an RDF graph containing SHACL constraints
and an RDF graph (in an RDF dataset) containing information on which to
validate the constraints.  A SHACL engine takes each node in the constraint
graph that is an instance of sh:Constraint and validates the constraint
encoded by this node against the information RDF graph.  The validation
succeeds if no constraint with an error severity level fails and fails
otherwise.

Received on Friday, 14 August 2015 03:44:29 UTC