[xquery-talk] Extending Saxon (Barxon, Fooxon, ...).

Hans-Juergen Rennau hrennau at yahoo.de
Sat Mar 19 09:00:25 PST 2011

Hello People,

the Saxon processor has a very interesting feature - "Integrated Extension 
Functions" - which amounts to the possibility to plugin own (custom or 
standard) Java functionality into the XQuery processor, by writing a little glue 
code. This has important advantages compared to the traditional approach of 
"reflexive" extension functions, see 
http://www.saxonica.com/documentation/extensibility/integratedfunctions.xml for 

*** Question: 
Are there other processors offering a similar extensibility, based on 
writing glue code?


Suppose there *are* (or soon will be) other processors, Fooxon and Barxon. It is 
clear that the glue code they require is different from the glue code which 
Saxon requires. But the information input determining how to write the glue code 
should be approximately the same (signatures and a little more). How about code 
generation, taking as input a generic XML description of the extension functions 
and their binding to Java methods? This way we could have a set of code 
generators generating from a single, generic description: Saxon glue 
code, Fooxon glue code, Barxon glue code, ...

This would amount to a new kind of portability. Note the similarity to code 
generation from WSDL. There, functionality is plugged into the www, and the 
generated code is generic. Here, functionality is plugged into XQuery 
processors, and the generated code is processor-specific. So...

*** Question: what do you think of generalizing the Saxon approach, by
a) encouraging all implemetators to support (an own flavor of) Integrated 
Extension Functions
b) defining a generic extention function description language (our 
EFDL, so-to-speak), 

c) encouraging implementators to provide their specific code generator (EFDL -> 
glue code)

Thank you for thougts and comments,
-- Hans-Juergen

More information about the talk mailing list