rdf-validate-shacl icon indicating copy to clipboard operation
rdf-validate-shacl copied to clipboard

Improve validation message of `sh:xone`

Open tpluscode opened this issue 3 years ago • 1 comments

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

tpluscode avatar May 07 '21 08:05 tpluscode

I like the idea. We should probably do the same for sh:and and sh:or.

martinmaillard avatar May 10 '21 06:05 martinmaillard