> >I understand this error to be along the lines of a "Can't find class
> >BchDate", as I had the same problem with Xalan whilst learning how to
> >implement extensions.
>
> I think you're right, as far as the semantics of the ERROR message is
> concerned. One reason you can't find a class is because you didn't compile
> the source; are you sure you have the _classfile_ available that
corresponds
> to your BchDate class?

Hi, thanks for the reply,

Firstly, yes the class file is present on the class path. The class is
compiled -- I can call util.BchDate (I've just packaged it to follow your
example) from anywhere on the commandline and the function main I added to
test the classpath works as expected, passes a dummy date to getDate, and
the formatted string is returned. From this I take it that the java code is
correct, works fine, and is present (compiled) on the classpath.. All is
well in that regard.

As previsouly mentioned, all my files work fine in Xalan. No changes need to
be made _at all_ to get Xalan to run the Java and output an FO file. This is
also true for the test files created with your example code discussed below:

> My final example is very close to yours. Here is the stylesheet root:

Thanks for that, I've cut and past your example snippets into two new files,
and the errors returned by FOP are the same. However, when the bchext
namespace prefix is used I now get:

Error: For extension function, could not find method
java.lang.String.getDate([expressionContext])

To me this indicates that the "xalan://util.BchDate" prefix is being ignored
entirely. I see no reason why FOP should believe that getDate is a method of
class String and call it as such. It's not like getDate returns a string
even! :-)

So, with the failure of that may I ask you the following:

Are you running this under NT?
Where on your classpath did you put the util.BchDate package (ie:
c:\data\bch\javacode\)?
What version of FOP are you using?
Any other suggestions?!

Thanks for your time, Best Regards

Gareth Noyce


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to