> 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