SPARQL Extensible Value Testing mechanism for registering SPARQL functions from SHACL Advanced Features #2560
Labels
enhancement
New feature or request
feedback wanted
Feedback from RDFLib users and contributors is wanted.
SPARQL
The whole advanced SHACL seems quite powerfull. One nice feature is SHACL Functions which requires a mechanism where the shacl shape graph can automatically register SPARQLFunctions to the sparql engine over SPARQL Extensible Value Testing.
When trying to find related issues or source code, I couldn't find anything besides the namespace which obviously mentions the term.
The naive approach that comes to my mind is to use metaprogramming to create a python function that receives a shacl graph as an input and creates a function with the right signature and in the body executes the sparql code with initBindings, and then adds it to CUSTOM_EVALS.
An example shapes graph:
A first sketch could look something like that.
As I am not familiar with the internals of rdflib and how
exactly works, I don't know how to completly implement it but it shouldn't be too much work, to get this working tho for someone who is familiar with the logic of it.
Is there interst in such a feature?
The text was updated successfully, but these errors were encountered: