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

[data-shapes] Add Node Expression sh:eval to execute SPARQL expressions (#315)

$
0
0
HolgerKnublauch has just created a new issue for https://github.com/w3c/data-shapes:

== Add Node Expression sh:eval to execute SPARQL expressions ==
Similar to sh:select node expressions which execute SPARQL SELECT queries, there should be a node expression function that executes SPARQL expressions (known from BIND and FILTER): https://www.w3.org/TR/sparql12-query/#CreatingValuesWithExpressions

Example (computes the length of the URI of the current focus node):

```
    ex:Resource-uriLength
        a sh:PropertyShape ;
        sh:path ex:uriLength ;
        sh:values [
            sh:eval "STRLEN(STR($this))" ;
        ]
```

This will return a single node, and can also be used to express ASK-like queries using sh:eval "EXISTS { ... }".

It would take parameters sh:eval and sh:prefixes and expand to [prefixes] SELECT ($eval AS ?result) WHERE {}


Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/315 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 214

Trending Articles



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