SHACL validation not considering datatypes #4144
Unanswered
MajewskiKrzysztof
asked this question in
Q&A
Replies: 1 comment 7 replies
-
When I convert your data to NQUADS it looks like this:
It looks like you are expecting the SHACL validation to check that the value conforms to the restrictions of the datatype. My understanding of the SHACL specification is that we should rely on the specified datatype and not perform any other checks if the datatype matches the constraint. RDF4J supports checking that the value conforms to the datatype during parsing. See https://rdf4j.org/javadoc/latest/org/eclipse/rdf4j/rio/helpers/BasicParserSettings.html#VERIFY_DATATYPE_VALUES and https://rdf4j.org/documentation/programming/rio/#configuring-the-parser--writer |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've noticed an invalid behavior when running SHACL validation for JSON-LD input.
This is my code:
The payload file:
And the rules file:
After running this example I get no violations.
Shouldn't the "test" cause
shacl:DatatypeConstraintComponent
when passed as integer?
The same issue exists for other datatypes like
xsd:dateTime
for example. It accepts any string value.Beta Was this translation helpful? Give feedback.
All reactions