O.K. here is the final installment to my work on Saxon
8.1.1 extension functions. This allows an extension
function to have a trailing formal argument of type
Expression. If that is the case, all remaining actual
arguments are bound to that expression array and can
be evaluated on demand under complete control of the
This patch depends on the deferred argument evaluation
(special form) patch.
I give an example in Function.java that are
demonstrated in demo/progncond.xsl
progn(expr1, expr2, ...) - fully evaluate all arguments
left to right and return the value of the last argument.
progi(i, expr1, expr2, ...) - fully evaluate all arguments
left to right and return the value of the i-th argument.
cond(c1,r1, c2,r2, ..., cn,rn) - determine the effective
boolean value of the conditions c1, c2, ... left to right
and return the value of the associated result expression
r1 or r2, ... respectively.
The demo shows a lot of the function of the closure
function as well, so the demo does depend on the user
closure function patch, but that is not essential to
demonstrate the work of progn, progi, and cond.