Closed tpluscode closed 1 month ago
https://www.w3.org/TR/shacl/#property-shapes
A property shape is a shape in the shapes graph that is the subject of a triple that has sh:path as its predicate.
A property shape must have an sh:path
.
The stacktrace is at parse time. Line 25 (which should be indented?) has sh:property with no sh:path. The sh:or
, each with a sh:path
does not fulfil the definition.
Maybe sh:or
should be on the node shape by removing the sh:property (line 25) and its closing ]
?
From that same paragraph, the next sentence:
A shape has at most one value for sh:path
I thought this meant that it's fine without sh:path
. For comparison, here's the same example running Top Quadrant's engine: https://s.zazuko.com/2KuNiJa
I would like to hear @holgerknublauch's opinon. From what I understand, the shapes from the sh:or
are merged in runtime, forming a valid property shape effectively. Parse time would too early to determine correctness of such a shape
Maybe
sh:or
should be on the node shape by removing the sh:property (line 25) and its closing]
?
This my actually work. I always forget that skipping sh:property
altogether is also valid in some scenarios
That text isn't wrong but it does not override or modify the previous text. "Exactly one" would be better. Elsewhere it says
Each value of sh:property in a shape must be a well-formed property shape.
If the code walks from the target start point it is encountered as a node shape. I can't see text that then makes the sh:or
apply because it is not attached to the node shape (obviously, the code is interpreting sh:property with no sh:path
as having no path step).
Jena parses all the shapes, not just reachable ones from targets, or ones encountered while validating the data.of the data.
SEMICeu/DCAT-AP has made changes.
Version
4.10
What happened?
When validating SHACL, Jena appears too strict when parsing property shapes, as it requires
sh:path
in all casesSee https://s.zazuko.com/3rcogrc. It should find a violation where the
schema:name
is commented out in data graph.Relevant output and stacktrace