You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Colin Paul Adams <co...@colina.demon.co.uk> on 2003/03/04 15:25:48 UTC
EXSLT
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?
--
Colin Paul Adams
Preston Lancashire
Re: EXSLT
Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.
Hi Colin,
I'll update the documentation to make this clearer. What it's trying to
say is the operation of installing or uninstalling a global function is not
thread-safe. But, an actual function instance should be thread-safe,
because it should not have any state.
Does that clarify things?
Dave
Colin Paul Adams
<colin@colina.de To: xalan-c-users@xml.apache.org
mon.co.uk> cc: (bcc: David N Bertoni/Cambridge/IBM)
Subject: EXSLT
03/04/2003 06:25
AM
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?
--
Colin Paul Adams
Preston Lancashire
Re: EXSLT
Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.
No, you don't, Everything in EXSLT that Xalan implements is automatically
installed.
Dave
|---------+--------------------------->
| | Colin Paul Adams|
| | <colin@colina.de|
| | mon.co.uk> |
| | |
| | 03/04/2003 09:10|
| | PM |
|---------+--------------------------->
>----------------------------------------------------------------------------------------------------------------------------------|
| |
| To: xalan-c-users@xml.apache.org |
| cc: (bcc: David N Bertoni/Cambridge/IBM) |
| Subject: Re: EXSLT |
>----------------------------------------------------------------------------------------------------------------------------------|
>>>>> "Mark" == Mark Weaver <ma...@npsl.co.uk> writes:
Mark> Calling XalanTransformer::initialise (once at process
Mark> start), will call this for each of the EXSLT functions. To
Mark> use them, just drop an appropriate prefix/namespace
Mark> declaration in your XSLT header, e.g.:
So I don't have to call initialiseExternalFunctionGlobal at all for EXSLT?
--
Colin Paul Adams
Preston Lancashire
Re: EXSLT
Posted by Colin Paul Adams <co...@colina.demon.co.uk>.
>>>>> "Mark" == Mark Weaver <ma...@npsl.co.uk> writes:
Mark> Calling XalanTransformer::initialise (once at process
Mark> start), will call this for each of the EXSLT functions. To
Mark> use them, just drop an appropriate prefix/namespace
Mark> declaration in your XSLT header, e.g.:
So I don't have to call initialiseExternalFunctionGlobal at all for EXSLT?
--
Colin Paul Adams
Preston Lancashire
RE: EXSLT
Posted by Mark Weaver <ma...@npsl.co.uk>.
> 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