Closed wouterbeek closed 5 months ago
Hi Wouter,
your statement 2. above is not correct. They are node shapes, and node shapes can also have sh:datatype and sh:class constraints. Where do you see evidence that they need to be property shapes for that?
Thanks for looking into this @HolgerKnublauch !
I ran into issues when I wrote [ sh:minCount 1]
instead of [ sh:datatype xsd:string ]
. From a user perspective, "may not occur more than once" is a constraint on a property, similar to "may not have values that are not XSD strings".
For some reason, [ sh:minCount 1 ]
was not allowed by the SHACL engine that was using, but [ sh:datatype xsd:string ]
was allowed.
Do you know whether there is a different between sh:minCount
and sh:maxCount
on the one hand, and sh:class
and sh:datatype
on the other hand? Is this differences somewhere in the standard? Intuitively, I thought of these are similar property / usable in the same contexts.
sh:min/maxCount certainly don't make sense with node shapes, only property shapes. The number of value nodes for a node shape is always 1, so anything except 1 would cause a violation. Maybe some engines even outright reject those use cases, but they shouldn't really.
Thanks for the feedback! I do not understand the use of sh:or
then, but this is due to a lack of knowledge on my side. I'm closing this issue now, and my try to learn more on the use of sh:or
later.
Observed
The SHACL standard contains the following example (Section 4.6.3) that is inconsistent with the rest of the standard:
This example allows us to derive a contraction, by following this line of reasoning:
sh:or
, the SHACL standard states: "A SHACL list of shapes to validate the value nodes against. Each value ofsh:or
in a shape is a SHACL list. Each member of such list must be a well-formed shape." (Section 4.6.3).sh:datatype
andsh:class
assertions.sh:path
as its predicate." (Section 2.3)sh:path
assertion, they cannot be property shapes.Expected
The example to be consistent with the rest of the standard.