-
Notifications
You must be signed in to change notification settings - Fork 62
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
Enable sh:pattern on IRIs #52
Comments
I don't believe there is need for separate 'relaxed' mode for this change. Changing |
FWIW it looks like the TQ SHACL implementation is here: https://github.com/TopQuadrant/shacl |
The spec is IMHO clear that IRIs can be checked too. |
@HolgerKnublauch
I originally read that as "the focusnodes of sh:pattern constraint are literals with datatype xsd:string" so thought it excluded IRIs. However, just looking at implementing this feature in pySHACL I see it is already implemented. All string-based constraint operations already work on IRIs, and not by accident, there is even a method in there for all string-based constraints to turn an IRI to a string before evaluating. So the spec must've been clear to me back when I wrote that code too. So can close this as not a bug. |
@HolgerKnublauch It is explicit on |
It is quite a common requirement to test an IRI to check if it is in a specific namespace, or contains a path element which is a specific character string or pattern. While the SHACL spec appears to restrict application of
sh:pattern
to string literals, it would be helpful to allow a 'relaxed' mode where it can also apply to IRIs (which are, after all, just a sequence of characters).Note that the TopBraid SHACL engine (maintained by the SHACL editor @HolgerKnublauch ) does operate in this mode - see https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!topic/topbraid-users/BUoROZt0BhM
The text was updated successfully, but these errors were encountered: