On 24 Nov 2012, at 21:55, Andy Seaborne <[email protected]> wrote:

> On 20/11/12 18:46, Rob Vesse wrote:
>> Hi All
>> 
>> I have put in place some new functionality which I'm calling User
>> Defined Functions – it is essentially a lightweight way for users to
>> define new functions for use in their SPARQL queries without having
>> to write the Java code for the function themselves.  This means it is
>> less powerful than adding a full extension function as you can't use
>> arbitrary Java code but it provides a simple way to encapsulate
>> complex or large expressions into simple function calls, in essence
>> it is an expression aliasing mechanism.
> 
> Good idea.

+1

>> 
>> Let me know what you think and any ideas for refinement beyond what I 
>> already listed here,
> 
> - - - - - - -
> off the top of my head syntax but the big thing to do would be to add syntax 
> (esp for SPARQL Update)
> 
> DEFUN my:function1(?x, ?y, ?z) =
> .... SPARQL expression ...
> ENDDEF

I tried something similar (i.e. defining functions without java) using 
javax.scripting, within assemblers. Has the advantage of standard syntax and no 
java.

Damian

Reply via email to