Your Java class needs to be called com.example.myTest, and it needs to be (in a directory or JAR file that is) on the class path.
 
You may find the -TJ option on the command line helpful for diagnostics if it isn't working.
 
Also, if you come to this list and say that something isn't working, it's always useful to say exactly how it failed - for example, an exact error message.
 
Michael Kay
http://www.saxonica.com/


From: Mohamed Noorulla [mailto:noor@retailwave.com]
Sent: 16 December 2008 15:04
To: 'Mailing list for the SAXON XSLT and XQuery processor'; Michael Kay
Subject: RE: [saxon] How will i use my java method / function in xsl ???

Thanks for your reply mike.

Now I created my own java class, and i use the following code lines in my xsl file.

code snippets :
==========

<xsl:message>
     square root of 25  =
     <xsl:value-of select="math:sqrt(25)" xmlns:math="java:java.lang.Math"/></xsl:message>
<xsl:message> myTest =
<xsl:value-of select="myTest:getAddResult('12','15')" xmlns:myTest="java:com.example.myTest"/>
</xsl:message>

In this, the first xsl:mesasge works and gives result. The second one, ie., my own created java method to add two numbers as string parameter.....

So u please tell, where do i put my compiled class file .... ?

Please reply to me the solution.....

regards,
Noorulla


--- On Tue, 16/12/08, Michael Kay <mike@saxonica.com> wrote:
From: Michael Kay <mike@saxonica.com>
Subject: RE: [saxon] How will i use my java method / function in xsl ???
To: noor@retailwave.com, "'Mailing list for the SAXON XSLT and XQuery processor'" <saxon-help@lists.sourceforge.net>
Date: Tuesday, 16 December, 2008, 8:08 PM

Instructions for calling Java methods from Saxon XSLT stylesheets can be found at
 
 
There are some examples in the documentation.
 
Michael Kay


From: Mohamed Noorulla [mailto:noor@retailwave.com]
Sent: 16 December 2008 14:02
To: saxon-help@lists.sourceforge.net
Subject: [saxon] How will i use my java method / function in xsl ???

hi everyone,

    I need to pass the data to jFreechart from the XSL. Also, after making chart or graph by
that jfreechart java class. Then i may need to write a jFreeChart glue function that can be
called from XSL ( Is XSL can call Java ? ) which returns an (graph or chart) Image.

So for this operation, please guide me.

How will i use my java method / function  in xsl ??? If possible, please send me any example, which use java methods in xsl.

Please reply soon, i am waiting for your reply...

regards,
Noorulla.