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

sh:minInclusive not evaluated correctly #505

Open
ulitol97 opened this issue Apr 1, 2022 · 1 comment
Open

sh:minInclusive not evaluated correctly #505

ulitol97 opened this issue Apr 1, 2022 · 1 comment
Labels

Comments

@ulitol97
Copy link
Member

ulitol97 commented Apr 1, 2022

I'm attempting to validate some RDF data thtough a SHACL schema. When setting a minimum-inclusive limit on a decimal quantity, it behaves as an exclusive limit.

For example, sh:minInclusive 18; does not validate for 18, the error message itself being contradictory:
LiteralValue("minInclusive violation. Expected 18 >= 18")

Example data used:

  • RDF
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex:      <http://example.org/> .

ex:reading a ex:sensorReading ;
          ex:readingTemperature "18"^^xsd:decimal .
  • Shapes Graph
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex:      <http://example.org/> .

# Filters of a valid sensor reading
ex:ValidReading a sh:NodeShape ;
                sh:targetClass  ex:sensorReading ;
      			sh:property [
    				sh:path     ex:readingTemperature ;
                    sh:datatype xsd:decimal ;
                    sh:minInclusive 18;
  				] .
@ulitol97 ulitol97 added the bug label Apr 1, 2022
@ulitol97
Copy link
Member Author

ulitol97 commented Apr 4, 2022

I fixed it by changing the following in the shapes graph:

  • sh:minInclusive 18 to sh:minInclusive 18.00

Still, I did not expect that behaviour and it does not happen using Jena-SHACL or TopQuadrant validators

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

No branches or pull requests

1 participant