Problem calling external java method 2005-10-20 - By Chris Bare
Hmmm,
As John implies, the situation is a bit different with XSLTC. Calling new in the xsl, like the following, works fine:
<xsl:variable name="helper" select="xsltest_Helper:new()"/> ... <xsl:value-of select="xsltest_Helper:square($helper,number($num))"/>
But if I try to get the 'helper' extension object as a parameter to the transformer, like so:
<xsl:param name="helper"/>
I get:
ERROR: 'Cannot find external method 'xsltest.Helper.square' (must be public).' FATAL ERROR: 'Could not compile stylesheet'
Again static methods work but instance methods don't, oddly enough. The docs only show an example where the extension object is created using new() in the stylesheet.
Is it possible to pass in extension objects as a parameter in an XSLTC compiled transformer?
-Chris
-----Original Message----- From: Chris Bare [mailto:a-cbare@(protected)] Sent: Thursday, October 20, 2005 10:25 AM To: xalan-j-users@(protected) Subject: RE: Problem calling external java method
Thanks a ton. That way works!
[...]
-----Original Message----- From: John Gentilin [mailto:gentijo@(protected)] Sent: Wednesday, October 19, 2005 6:18 PM To: Chris Bare Cc: xalan-j-users@(protected) Subject: Re: Problem calling external java method
Chris,
I declare my extensions, in interpretive mode, a bit differently.
[...]
|
|