ISSUE-70: Proposed clean up of sh:defaultValueType

Simon had recently reported [1] an issue having to do with untyped blank 
nodes such as the sh:property in

         a sh:ShapeClass ;
         sh:property [
             sh:predicate ex:parent ;
             sh:minCount 3 ;
             sh:maxCount 3 ;
         ] .

The current SHACL spec allows these sh:property values to be untyped 
blank nodes, because the syntax would otherwise be bloated with quite a 
number of uninteresting rdf:type triples - it would become

sh:property [
     a sh:PropertyConstraint ;
     sh:predicate ex:parent ;

The same pattern is used in a handful of other places:

- sh:argument sh:defaultValueType sh:Argument .
- sh:constraint sh:defaultValueType sh:NativeConstraint .
- sh:filterShape sh:defaultValueType sh:Shape .
- sh:inverseProperty sh:defaultValueType sh:InversePropertyConstraint .
- sh:property sh:defaultValueType sh:PropertyConstraint .
- sh:qualifiedValueShape sh:defaultValueType sh:Shape .
- sh:scope sh:defaultValueType sh:NativeScope .
- sh:shape sh:defaultValueType sh:Shape .
- sh:valueShape sh:defaultValueType sh:Shape .

The type triples are usually not required, but they do make a difference 
if someone wants to run SHACL validation on a graph containing shape 
definitions, e.g. as in Simon's case to detect that 
sh:qualifiedValueShape had two values. My earlier version of the Turtle 
file had a solution for this using a template argument called 
sh:defaultValueType, which was declaring the fallback default value type 
that engines could use unless another rdf:type was present. But this was 
never written down in prose. I have now cleaned this up and simplified 
the approach using the sh:defaultValueType triples above. On my current 
branch, I have added a subsection explaining how this works:

In that spirit, my PROPOSAL is to close ISSUE-70 by stating that 
sh:valueClass constraints do not need special treatment of blank nodes, 
but that the implicit rdf:type triples for certain blank nodes can be 
pre-computed by an engine whenever the user requests validation of shape 



Received on Monday, 24 August 2015 02:40:25 UTC