- From: Holger Knublauch via GitHub <sysbot+gh@w3.org>
- Date: Sat, 08 Mar 2025 09:43:38 +0000
- To: public-shacl@w3.org
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
Received on Saturday, 8 March 2025 09:43:39 UTC