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

allow interpolating vars in message for all constraints #84

Open
VladimirAlexiev opened this issue Sep 17, 2024 · 3 comments
Open

allow interpolating vars in message for all constraints #84

VladimirAlexiev opened this issue Sep 17, 2024 · 3 comments

Comments

@VladimirAlexiev
Copy link
Contributor

VladimirAlexiev commented Sep 17, 2024

(Related to #27, inspired by w3c/data-shapes#158)
https://www.w3.org/TR/shacl/#x5.3.2-mapping-of-solution-bindings-to-result-properties specifies how {?vars} are interpolated into the message, but only for SPARQL constraints.

It would be useful to allow this for all shapes. Why should standard constraint components lack this feature?

What vars can be used in interpolation?

  • ?this
  • ?value
  • Constraint Component parameters as used in POTENTIAL DEFINITION IN SPARQL

BTW, is it ok to use {$value} in sh:message, or should it be spelled as {?value}?

@HolgerKnublauch
Copy link
Contributor

Both {$value} and {?value} can be used interchangeably.

@bertvannuffelen
Copy link

I support improvements for message handling, so that other languages have also access to the valuable information in their messages.

@VladimirAlexiev
Copy link
Contributor Author

To support a case in SEMICeu/MLDCAT-AP#19:

sh:minCount, sh:maxCount should bind ?value to the actual number of occurrences found

If that is confusing (because ?value is supposed to be an actual resource found in the graph, not a count), then maybe a new variable ?_count should be introduced.
I used an underscore because the name ?count may well conflict with a variable that the shape author wanted to use for a different purpose

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

No branches or pull requests

3 participants