zazuko / rdf-validate-shacl

Validate RDF data purely in JavaScript. An implementation of the W3C SHACL specification on top of the RDFJS stack.
MIT License
98 stars 13 forks source link

Validation report message not included when using recursive shapes #67

Open holycrab13 opened 3 years ago

holycrab13 commented 3 years ago

Validation report message not included when using recursive shapes. Tested with sh:and

Example:

@prefix dash: <http://datashapes.org/dash#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dataid: <http://dataid.dbpedia.org/ns/core#> .
@prefix dct:   <http://purl.org/dc/terms/> .
@prefix dcat:  <http://www.w3.org/ns/dcat#> .
@prefix dcv: <http://dataid.dbpedia.org/ns/cv#> .

##########
# Group
##########

<#dataid-group-test>   
    a sh:NodeShape ;
    sh:targetClass dataid:Group ;
    sh:and (<#en-title>) .

<#en-title>   
    a sh:PropertyShape ;
    sh:severity sh:Violation ;
    sh:message "Required property dct:title MUST occur at least once AND have one @en " ;
    sh:path dct:title ;
    sh:minCount 1 ;
    sh:languageIn ("en") ;
    sh:uniqueLang true .

Validation failure due to the PropertyShape will not give access to the error message.

Rdataflow commented 2 years ago

It looks to me this one issue has been fixed by https://github.com/zazuko/rdf-validate-shacl/commit/5e4b3757eb1a883dd9b1537ed24b24f24892e6cf