Closed GerwinBosch closed 3 years ago
Just by looking at the snippet, isn't the blank node the id of a PropertyShape
?
I'd expect it to have the schema:PersonShape
term as the value instead of the blank node
From my understanding of the SHACL spec, it would be wrong to point to the parent NodeShape
instead of the PropertyShape
that raised the invalid result. If you want a URI, the best way is to give a URI to your PropertyShape
:
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <http://example.org/> .
schema:PersonShape
a sh:NodeShape ;
sh:targetClass schema:Person ;
sh:property ex:givenNameShape ;
.
ex:givenNameShape a sh:PropertyShape ;
sh:path schema:givenName ;
sh:datatype xsd:string ;
sh:name "given name" ;
.
When retrieving the sourceShape it returns a blank-node, it would be nice to get the IRI instead of the blank node label