-
Notifications
You must be signed in to change notification settings - Fork 17
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:pattern not evaluated correctly #492
Comments
Relevant spec section: 5.4.4 XML Schema String Facet Constraints, which references XPath 5.6.1 Regular expression syntax. The examples in 5.6.3 fn:matches indicate that your reading is correct.
This also suggests that we need a test. |
Hello, I haven't had time to follow the SHaclEX developments and today I tried to upgrade to SHaclEX 0.2.2 and all tests passed without having to modify the regex. It seems like ShEx module re-introduced the Xerces dependency, which we tried to exclude and it works so far (we only call the SHACL). Also, we found that there is a fair number of dependencies wihin SHaclEX with mismatched version numbers, which we were forced to duct tape due to our maven-enforcer-plugin settings: https://github.com/eclipse/lyo/pull/248/files#diff-f5751dbd520a10ddcb49fe2ab71c084c779c3e2cf88765b9cc00593b5e50208cR105 Cautiously, I could say that this issue could be closed given that the other two issues don't impact |
Thanks for the update. I think we can close this issue. About the other topics, it would be great if add specific issues for them. One possibility to clean the dependencies a bit more if you are only using SHACL is that you consider to depend on SHACL-S which is specific about SHACL...at this moment, SHaclEX is an umbrella project which invokes either ShEx-s o SHACL-s depending on which type of RDF validation you use, so depending on them may avoid to use some extra dependencies which you don't need. |
shaclex 0.1.103
jena 4.4.0
jdk 11 temurin
eclipse lyo 5.0.0-snapshot
We disabled our validation module build during the JDK 11 migration in Eclipse Lyo and now after enabling it and updating to latest ShaclEx we discovered that a number of old passing test cases now fail. For example:
The spec says to follow the SPARQL patterns: https://www.w3.org/TR/shacl/#PatternConstraintComponent Which in turn gives us almost the same regex as an example: https://www.w3.org/TR/sparql11-query/#func-regex
When we change the annotation on the property from
@ShaclPattern("^B")
to@ShaclPattern("^B.*")
, all tests pass.I have two thoughts: either it's due to Jena 4 migration or cough someone may have introduced a regression in weso/utils#148. However, I don't think that going back to Xerces is a good idea, so we may want to replicate whatever Jena does to evaluate regexps in a SPARQL-compliant way.
The text was updated successfully, but these errors were encountered: