- From: Tomasz Pluskiewicz via GitHub <sysbot+gh@w3.org>
- Date: Sat, 22 Mar 2025 05:11:30 +0000
- To: public-shacl@w3.org
tpluscode has just created a new issue for https://github.com/w3c/data-shapes:
== Use Case: using a Node Expression for `sh:hasValue` and `sh:defaultValue` at the same time ==
This may already be implied, but I'd like to spell out a scenario where (the same) Node Expression is set to both hasValue and defaultValue. This will allow engine to validate a property and also set its value if missing
Example: SHACL-SHACL computing and validating `sh:conforms`
```turtle
[
sh:targetClass sh:ValidationReport ;
sh:property [
sh:path sh:conforms ;
sh:datatype xsd:boolean ;
sh:hasValue _:conforms ;
sh:defaultValue _:conforms ;
] ;
].
_:conforms
fn:exists ([
sh:path ( sh:validationResult sh:severity ) ;
sh:hasValue sh:Violation ;
]) ;
.
```
I make the assumption that only violations should actually fail validation.
Even if we do not put such a construct in SHACL-SHACL, an engine which implements Node Expressions could use this method for this or other purposes
Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/333 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 22 March 2025 05:11:31 UTC