Quantcast
Channel: public-shacl Mail Archives
Viewing all articles
Browse latest Browse all 204

[data-shapes] Use Case: using a Node Expression for `sh:hasValue` and `sh:defaultValue` at the same time (#333)

$
0
0
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

Viewing all articles
Browse latest Browse all 204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>