rdf-validate-shacl
rdf-validate-shacl copied to clipboard
Improve validation message of `sh:xone`
I would propose tweaking the detail validation result message when an XONE constraint is violated
Currently it produces no message at all. Without even knowing which sub shapes are conflicted, it's quite difficult to get a grip on what is wrong.
I have a few ideas
First, could be to enumerate all of the sh:xone
and produce a message like
Resource must be exactly one of A, B, C
Where A
, B
and C
would be the rdfs:label
or node value if label is not given. This would also apply to a focus node where none of the child shapes are matched
Alternatively, if we can get the info, could be to give the opposite and only mention the shapes which were matched and thus are in conflict
Resource cannot be A and C at the same time
Here B
is hypothetically excluded
I like the idea. We should probably do the same for sh:and
and sh:or
.