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 #204

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

allow interpolating vars in message for all constraints #204

VladimirAlexiev opened this issue Sep 17, 2024 · 3 comments
Labels
Core For SHACL 1.2 Core spec

Comments

@VladimirAlexiev
Copy link

VladimirAlexiev commented Sep 17, 2024

(Related to #173, inspired by #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
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

@HolgerKnublauch HolgerKnublauch transferred this issue from w3c/shacl Jan 20, 2025
@HolgerKnublauch HolgerKnublauch added the Core For SHACL 1.2 Core spec label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core For SHACL 1.2 Core spec
Projects
None yet
Development

No branches or pull requests

3 participants