Skip to content

Validation of sh:targetNode when the node is not present in the data #5140

Answered by hmottestad
danaivach asked this question in Q&A
Discussion options

You must be logged in to vote

Seems that it’s correct to validate the minCount constraint for a targetNode even if the target node is not present in the data.

The spec isn't exactly very clear: https://www.w3.org/TR/shacl/#targetNode

But there is a test case that is validated against the reference SHACL implementation:

There is also a test from the W3C SHACL test suite that tests for something similar: https://github.com/eclipse-rdf4j/rdf4j/blob/main/core/sail/shacl…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hmottestad
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
wontfix issue won't be fixed (close reason) specification issues related to compliance to standards and external specs
2 participants
Converted from issue

This discussion was converted from issue #5138 on September 30, 2024 11:59.