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

Florent Georges lists at fgeorges.org
Sat Mar 19 20:43:01 PST 2011

Hans-Juergen Rennau wrote:


> the Saxon processor has a very interesting feature -
> "Integrated Extension Functions"

  That's a very interesting subject, and as Adam said, we had
discussions on that topic in the past few weeks.  Here are some
thoughts about it:

  1/ different processors can be written in different languages,
     and can offer extensibility in different, even several

  2/ the "glue code" is often very simple (usualy implementing a
     specific interface and registering the resulting class on
     the processor); I don't really see the advantage of
     generating this code, even though it could sometimes ease
     some aspects (especially checking the number and type of
     parameters from an abstract signature)

  3/ what is trickier is the access to the processor object
     model: even in the same language (say Java), each processor
     has its own object model (that is, the way it represents an
     XDM instance)

  4/ the approach used by the open source implementations of the
     EXPath modules HTTP Client and ZIP is to define a few simple
     interfaces that abstract access to the object model, as well
     as creating it.  So most of the code is generic for a Java
     implementation, and a specific implementation only has to
     implement those few interfaces for a specific processor
     (e.g. there is an implementation for eXist, for Saxon and
     for Qizx)

  5/ this is NOT defining a general-purpose set of interfaces, to
     be implemented once for all projects.  The HTTP Client
     project defines its own set of of interfaces, and so does
     the ZIP project.  This can be seen as duplicating code, but
     I see it as localizing needs and only implementing what is
     actually needed for a specific project

  6/ indeed this could be a good starting point to gather some
     information about what extension functions actually need
     from real-life examples, in order to factorize out all this
     in a generic project

  I will present something about this topic at the XML Prague
2011 pre-conference day <http://preconference.info/>.  That will
be a great opportunity to get ideas from different users and
different vendors.  I hope you will be there!


Florent Georges


More information about the talk mailing list