This may have been more appropriatly posted to the dev list, I realized after sending
it to xalan-j-users.
Any suggestions, even "Never gonna happen, it's impossible", would be helpful. ;)
-----Original Message-----
From: Derek Lewis
Sent: Wed 04/02/2004 1:26 PM
To: [EMAIL PROTECTED]
Cc:
Subject: Extension functions in XSLTC using ExpressionContext
I'm having a heck of a time trying to get my Java extension functions to work in
XSLTC, and think I've finally narrowed down why.
It looks to me like Java extension functions, when called from XSLTC, cannot have
ExpressionContext as the first argument. The documentation for Xalan says they can,
and I can't find any information stating that this is not the case in XSLTC, but from
my testing, and looking at the XSLTC code, it looks like that is the case.
>From org/apache/xalan/xsltc/compiler/FunctionCall.java
if (Modifier.isPublic(mods)
&& methods[i].getName().equals(methodName)
&& methods[i].getParameterTypes().length == nArgs)
{
...
}
It seems to only check that the methods have the same number of arguments, not that
they have the same OR one extra argument, when the first argument is an
ExpressionContext.
My question is this: Is it even possible for me to modify things such that the
behavior will be the same as in regular Xalan? I'd like to know if there's some
reason it's impossible (eg. maybe XSLTC doesn't use ExpressionContext at all) before I
attempt it.