Closed white-gecko closed 7 years ago
I see where you are coming from. We did have similar discussions in the past, on whether to encourage default values for min/maxCount constraints. I believe your scenario is similar to sh:minCount=0 and best handled by the UI tools. In UI tools, there would typically be a drop down box with values such as "unlimited", "at least one", "exactly one". Likewise for node kind a UI would typically start with "any" regardless of whether a sh:nodeKind constraint exists or not. This would IMHO be better although I don't have any formal evidence for this other than the (small) performance overhead of checking for sh:AnyNodeKind. So I am not totally opposed to your suggestion. However, I believe if we go down this route, people will soon ask for similar catch-all values for sh:class (sh:AnyClass), sh:datatype, sh:maxCount (sh:Unlimited), sh:shape (sh:AnyShape). I find this pattern redundant and best handled on UI level. If the RDF graph has no value for a parameter, then it is already "unconstrained".
Hi Natanael, we have recently changed to a more formal use of GitHub and it was suggested that we try to get feedback from the submitter on whether they are OK with closing these tickets. It would help us if you could clarify whether you can live with the current state.
(Shapes Constraint Language (SHACL) W3C Editor's Draft 15 December 2016, https://w3c.github.io/data-shapes/shacl/#NodeKindConstraintComponent)
My proposal: There should also be an instance of
sh:NodeKind
which stands for the combination of all of the three kinds:sh:BlankNodeOrIRIOrLiteral
,sh:NodeOrLiteral
, or justsh:AnyNodeKind
or something similar.Argument: I assume, the default for no
sh:nodeKind
specified is that it can by of any kind. But to make the open world a little bit more precise in this case it should also be possible to explicitly specify this case, e.g. when writing out the defaults.