Closed init-dcat-ap-de closed 1 year ago
@volkerjaenisch gave me the decisive tip:
The problem is, that ex:orPathProperty
has 0 or 2 property paths, but it should have exactly 1.
I cannot use sh:or
or sh:xone
here, the solution is to use sh:alternativePath
:
ex:orPathProperty
sh:message "Custom message for ex:orPathProperty!" ;
sh:path [ sh:alternativePath ( ex:orPathOne ex:orPathTwo ) ] ;
sh:minCount 1 ;
.
Hello,
we created SHACL-Shapes to validate the German application profile for DCAT-AP:
I validated them with https://www.itb.ec.europa.eu/shacl/shacl/upload One problem emereged where I can not find a solution to:
What do I try to archive? I want one NodeShape which targets the class and includes all named property shapes:
This works on https://shacl.org/playground/ as planned, but does not validate, because![grafik](https://user-images.githubusercontent.com/14979304/210316518-af901ec8-6580-401a-b3b5-d79e64e5cfeb.png)
If I use
sh:node
instead ofsh:property
for linking toex:orPathProperty
, it validates, but I loose the custom error message.A workaround would be to double the NodeShape:
But this would mean that shapes using
sh:or
are treated differently... I would try to avoid this.Data Graph for Testing