Replies: 3 comments
|
Yes absolutely. Such a generalization was implemented for TopBraid, e.g. with JS-based functions. And they can all be invoked consistently using https://w3c.github.io/shacl/shacl-af/#node-expressions-function |
0 replies
|
Here's my idea for Reusable Node Expressions, implementing #168 Used as ex:ShapeB
sh:targetNode [
ex:directlyTypedAs ( <https://data.exemple.fr/B> )
] ;The expression ex:directlyTypedAs
sh:parameter [
sh:path ex:arg1 ;
sh:nodeKind sh:IRI ;
sh:order "0"^^xsd:decimal ;
] ;
sh:expression [
sh:path [
sh:inversePath rdf:type ;
sh:nodes [ sh:var "arg1" ] ;
] ;
] ;
. |
0 replies
|
For SPARQL, it already provides ex:directlyTypedAs
sh:parameter [
sh:path ex:arg1 ;
sh:nodeKind sh:IRI ;
sh:order "0"^^xsd:decimal ;
] ;
sh:expression [
sh:select """
SELECT ?instance {
?instance a $arg1
}
"""
] ;
. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'd like to combine some of the ideas brought up in #279, #314, #315 + the prior art of
sh:Function,sh:SPARQLFunctionand https://datashapes.org/sparql#I think there is significant overlap to combine these in a single solution which could solve multiple function (pun intended). A generalised function definition would then be backed by one or more implementations
dash-sparql:)All reactions