In your code the only thing you are putting on the classpath is the Saxon code in saxon8.jar. You need to put your own Java class on the classpath too.
Michael Kay

From: [] On Behalf Of enis enis
Sent: 01 June 2006 17:37
Subject: Re : [saxon] How to generate an Identifer in XQuery

> Then I added the path for pkg in the classpath : c:/saxon/pkg

 > If you read carefully the example, you see I add the current
>directory (".") to the classpath, and the "pkg" directory is a child of
>".".  So add "c:/saxon" to your classpath, instead of "c:/saxon/pkg".

I added "c:/saxon" to the classpath but I have the same error !
"coudln't find a matching 1-argument fucntion named {java:pkg.GenerateId}generateId()"
so the problem is that it doesn't detect the path for the java class "GenerateId" maybe !

to execute the query I'm using a batch file like :
"rem    set JAVA="C:\Program Files\Java\jdk1.5.0_07\bin\java"
set JAVA=java
rem    modify the following line to set the classpath (saxon.jar)
set CP=-cp c:\saxon\saxon8.jar
 %JAVA% %CP% net.sf.saxon.Query %1 %2 %3 %4 %5 %6 %7 %7"

so I execute it like :
c:\saxon>xquery -s test.xml -o sortie.xml test.xql