Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected sh:or SHACL violation #98

Open
Sabachi opened this issue May 27, 2022 · 1 comment
Open

Unexpected sh:or SHACL violation #98

Sabachi opened this issue May 27, 2022 · 1 comment

Comments

@Sabachi
Copy link

Sabachi commented May 27, 2022

SHACL validation incorrectly creates a violation for the sh:or constraint when the NodeShape with the sh:or constraint also has a complex sh:property pointing towards a sh:node (Which is a NodeShape in itself).

Visit https://s.zazuko.com/RJmit for a minimum working example (mwe).
We expect the SHACL report to look like this:

{
    _:report a sh:ValidationReport ;
        sh:result [
            rdf:type sh:ValidationResult ;
            sh:resultSeverity sh:Violation ;
            sh:sourceConstraintComponent sh:NodeConstraintComponent ;
            sh:sourceShape <http://example.com/ns#educationPropShape> ;
            sh:focusNode <http://example.com/ns#Alice> ;
            sh:value <http://example.com/ns#bachelor> ;
            sh:detail [
                rdf:type sh:ValidationResult ;
                sh:resultSeverity sh:Violation ;
                sh:sourceConstraintComponent sh:MinCountConstraintComponent ;
                sh:sourceShape [
                    sh:path <http://example.com/ns#details> ;
                    sh:minCount 1 ;
                ] ;
                sh:focusNode <http://example.com/ns#bachelor> ;
                sh:resultPath <http://example.com/ns#details> ;
                sh:resultMessage "Less than 1 values" ;
            ] ;
            sh:resultPath <http://example.com/ns#education> ;
            sh:resultMessage "Value does not have shape <http://example.com/ns#bachelorNodeShape>" ;
        ] ;
        sh:conforms false .
}

In the mwe the sh:detail contains an additional SHACL violation that we don't expect to see in the SHACL report.

@giacomociti
Copy link
Contributor

this should be fixed by #126, we just need to upgrade the playground to use version 0.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants