Closed KonradHoeffner closed 2 years ago
Hi @KonradHoeffner
You are using sh:equals
incorrectly. It appears that you're using a SHACL property-path expression in the value of sh:equals
but that is not valid. sh:equals
must be a single value.
I haven't tried it, but I think simply swapping the values of sh:path
and sh:equals
around do what you want:
:RoleSuperClassShape a sh:NodeShape;
sh:targetClass meta:Role;
sh:property [
sh:path ( rdfs:subClassOf rdf:type );
sh:equals rdf:type;
].
Thanks for the help, that seems to do the trick! It also reports instances which do not have a value for rdfs:subClassOf but that is a problem in my shape and not pySHACL.
The following shape should specify that all superclasses of type "Role" should have type "Role" as well. For example :SeniorPhysician is a role and has superclass :Physician, which is a role as well, so I expect the following to validate but it does not.
Why does it give me an error even though the property path sequence should resolve to meta:Role? Is this an error in my SHACL file or a bug in pySHACL?