-
Notifications
You must be signed in to change notification settings - Fork 30
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
Alternative property for computed values #301
Comments
Is it really a
|
I don't think the use of node expressions where we previously already allowed complex SPARQL paths is fundamentally different. In the future, people may naturally switch between the node expression features and paths. It is probably just for the transition period that this confusion will happen. What are the use cases to only compute the predicate, and not its values directly? However, it is potentially worthwhile to introduce a distinct property for node expressions only, so that a property shape EITHER has sh:path or sh:expression, where sh:expression would be excluded from SHACL Core engines and always point to node expressions. |
I stand by the explanation of @HolgerKnublauch's original proposal
I think it's good that we move away from SPARQL analogies. This should make it easier to shift to a more functional nature of Node Expressions (and Property Paths). In both cases, you'd view the value of The only question if how we treat
What do you think about my proposal in this comment to introduce a new property and keep It might as well be called |
Yes.
|
D'oh, I think I just had an epiphany, almost trivial in retrospect: If we introduce a new property for node expressions such as sh:expression, we should just call it sh:values and have a pretty good solution to the open questions:
I'll see if I can make a PR tomorrow on these refinements. |
Is this almost exactly SHACL-AF? |
Yes. I think it was useful to evaluate the alternatives yet it would be perfect if we can confirm the original syntax. Much less disruption. |
#222 is already merged into main, so I am not sure what else was there to discuss. But ok, for process reasons I have reverted the agenda and moved the new topic (this) to the second part of the agenda. |
I think the main agenda point is whether to incorporate NE in the FPWD which is issue #222 (which can be reopened). The original CfC didn't explicitly cover that. |
* #288: Added sh:SelectExpression, with test cases and TTL changes * #222, #288: Update SHACL-SHACL for general NodeExpression and SelectExpression Signed-off-by: Alex Nelson <alexander.nelson@nist.gov> * #222, #288: Undo update SHACL-SHACL for general NodeExpression and SelectExpression This patch undoes commit 8632a3e. This was done manually instead of with `git revert`. Signed-off-by: Alex Nelson <alexander.nelson@nist.gov> * Update shacl12-vocabularies/shacl.ttl Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> * #301: Switched node expressions from sh:path to sh:values and sh:defaultValue * Update shacl12-core/index.html Co-authored-by: Tomasz Pluskiewicz <tpluscode@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> * Update shacl12-core/index.html Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> * Update shacl12-core/index.html Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> * Update shacl12-sparql/index.html Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> * Update shacl12-core/index.html Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> * Update shacl12-core/index.html Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> * Update shacl12-core/index.html Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> * Moved example to after the evaluation part * Attempted to clarify that the "or" is not either-or * Update shacl12-core/index.html Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> --------- Signed-off-by: Alex Nelson <alexander.nelson@nist.gov> Co-authored-by: Alex Nelson <alexander.nelson@nist.gov> Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com> Co-authored-by: Tomasz Pluskiewicz <tpluscode@users.noreply.github.com>
As discussed in the definition of node expressions PR, the
sh:path
property could be misleading for the use case of creating intermediate values for validations. One may expect thatsh:path
keeps the functionality of traversing the path given as the object value. In the case of a node expression, the result of the node expression should be used for traversing. A new property could be defined that skips the traversing part and only sets the value to the computed value of the node expression.Below are two property shapes and how they could be translated into SPARQL:
There were multiple proposals in the PR for the name of the property. derived sounds good, but I would prefer computed. As shown in the example, it's not required to derive the value from any existing data. Maybe also combine it with value, like computedValue. computedNode may give the impression that only blank node and named node results are expected from the node expressions, but literals would also be allowed.
I took the term value from the SPARQL definitions of the constraint components as I think we don't have a defined term for the result of the traversing step from focus node over path.
The text was updated successfully, but these errors were encountered: