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 |
Beta Was this translation helpful? Give feedback.
-
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" ] ;
] ;
] ;
. |
Beta Was this translation helpful? Give feedback.
-
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
}
"""
] ;
. |
Beta Was this translation helpful? Give feedback.
-
I'd like to combine some of the ideas brought up in #279, #314, #315 + the prior art of
sh:Function
,sh:SPARQLFunction
and 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:
)Beta Was this translation helpful? Give feedback.
All reactions