- From: Holger Knublauch <holger@topquadrant.com>
- Date: Mon, 24 Aug 2015 12:39:48 +1000
- To: RDF Data Shapes Working Group <public-data-shapes-wg@w3.org>
Simon had recently reported [1] an issue having to do with untyped blank nodes such as the sh:property in ex:QualifiedValueShapeExampleShape 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: https://github.com/w3c/data-shapes/commit/310d85fbf85e7ddd9d00c1abf14ed4001dd8e74d 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 structures. Regards, Holger [1] https://lists.w3.org/Archives/Public/public-data-shapes-wg/2015Aug/0134.html
Received on Monday, 24 August 2015 02:40:25 UTC