pyshacl gives an error for a sh:hasValue rule

25 Views Asked by At

I try to validate the following triple

 @prefix atold: <http://publications.europa.eu/resource/authority/> .
   
  .....

 :property dct:language <http://publications.europa.eu/resource/authority/language/DEU> 

with the following rule:

sh:LanguageProp
    a sh:PropertyShape ;
    sh:path         dct:language ;
    sh:property [
          sh:hasValue <http://publications.europa.eu/resource/authority/language> ;
          sh:nodeKind sh:IRI ;
          sh:path skos:inScheme
      ] ;
    sh:nodeKind     sh:IRI ;
    sh:minCount     1 .

All needed ontologies have been loaded but I get the following result in pyShacl:

Constraint Violation in HasValueConstraintComponent (http://www.w3.org/ns/shacl#HasValueConstraintComponent): Severity: sh:Violation Source Shape: [ sh:hasValue atold:language ; sh:nodeKind sh:IRI ; sh:path skos:inScheme ] Focus Node: http://publications.europa.eu/resource/authority/language/DEU Result Path: skos:inScheme Message: Node http://publications.europa.eu/resource/authority/language/DEU->skos:inScheme does not contain a value in the set: ['http://publications.europa.eu/resource/authority/language']

in http://publications.europa.eu/resource/authority/language/DEU there is

<skos:inScheme rdf:resource="http://publications.europa.eu/resource/authority/language"/>

The same input does validate with Apache Jena, so i'm wondering what is going on...

0

There are 0 best solutions below