> Are there any examples of using EXSLT with XalanC? I can't find any in
> the distribution.
>
> Incidentally, the 1.4 documentation says:
>
>     * installExternalFunction() makes the function available in
> the current instance of XalanTransformer. Use
> uninstallExternalFunction() to remove the function.
>
>     * installExternalFunctionGlobal() makes the function
> available globally. Use uninstallExternalFunctionGlobal() to
> remove the function. The global functions are static. The global
> install and unistall operations are not thread-safe; the global
> functions are thread-safe..
>
> So there is a contradiction here. Are the global installs thread safe?

No, the global functions aren't thread safe.

Calling XalanTransformer::initialise (once at process start), will call this
for each of the EXSLT functions.  To use them, just drop an appropriate
prefix/namespace declaration in your XSLT header, e.g.:

<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
        xmlns:math="http://exslt.org/math";
        xmlns:exsl="http://exslt.org/common";
        extension-element-prefixes="exsl math">

Then: just use exsl:node-set, math:max, etc.

Note that not all of EXSLT is supported (dig around in the EXSLT directory
to see which functions are).

Mark

Reply via email to