shapes-ISSUE-49 (Dimitris): Distinction between scoped and unscoped shapes [SHACL Spec]

shapes-ISSUE-49 (Dimitris): Distinction between scoped and unscoped shapes [SHACL Spec]

http://www.w3.org/2014/data-shapes/track/issues/49

Raised by: Dimitris Kontokostas
On product: SHACL Spec

>From the current discussions it looks like SHACL is going to support both scoped and unscoped shapes.

The scope of a shape can be a class (i.e. "rdf:type ex:ClassA) or something more generic as suggested in issue 48, the shacl-sparql proposal or http://w3c.github.io/data-shapes/shacl/#scope.
The scope in this case acts as detection and means that all resources that match a scope must comply with a shape definition. 

Unscoped shapes are shapes with no scope and their application depends either on the current context or a starting node.

To what extend should SHACL re-use or mix scoped and unscoped shapes? possible options are:
1) scoped and unscoped shapes are different and cannot be mixed
2) scoped and unscoped shapes are different but can be mixed
3) scoped and unscoped shapes can be used interchangeable. In this case scope will probably play a different role in each case: detection in scoped shapes or validation in unscoped shapes.

Some ambiguous cases are:

* sh:nodeShape / sh:valueShape are used to link a resource with a shape with e.g. "ex:resA sh:nodeShape ex:shapeA" or an sh:property value with a shape.
Intuitively, sh:nodeShape and sh:valueShape have a kind of an unscoped shape behaviour using ex:resA as a starting node or the current focus node as context. 
In this case, is a scope allowed to exist in ex:shapeA? 
in the case of sh:nodeShape for example, how should shacl interpret sh:shapeA if it had the following scopes:
 - "sh:nodeShape ex:shapeA" is kind of problematic on how validation is initialized
 - "sh:nodeShape ex:shapeB"
 - "rdf:type ex:ClassA" scope would probably have to turn into a validation rule (instead of detection) and ensure the existence of "rdf:type ex:ClassA"

* If a shape has a scope but is also used in an unscoped context (like above) is the scoped validation still applied?

Received on Wednesday, 13 May 2015 13:37:03 UTC