I am running Saxon B (saxon8.jar).  It is installed and accessible via my %classpath%.  I cannot seem to make it find the class containing the extension function and I am out of options to try.  Help would be much appreciated.

Thanks.

The function class is:

package XSLTEXT;

import java.io.*;
import java.lang.*;
import java.util.*;

import org.w3c.xsl.*;

/********************************************************************/
/* Utility methods that encapsulate unruly procedures               */
/********************************************************************/

public class SomeUtils
{
    public final static String SEP = ";";

    /*------------------------------------------------------------------*/

    /* no constructor */
    private SomeUtils ()
    {
    }

    /*------------------------------------------------------------------*/

    public static String TestMethod (String S)
    {
        return (Integer.toString(S.length()));
    }
}

After compilation, I move the class file to the following location on my Windows system: C:\SaxonExt\XSLTEXT\SomeUtils.class.

My %classpath% environment variable ends with ";C:\SaxonExt\XSLTEXT.

The following Java main program when compiled accesses the class:

import java.lang.*;
import java.util.*;
import java.io.*;


/********************************************************************/
/* Main Program for test                                            */
/********************************************************************/

public class Main
{
    private static PrintWriter STDOUT = null;

    /*------------------------------------------------------------------*/

    public static void main (String args[])
    {
        int i;
        int j;
        PrintWriter P = null;

        /* Use the new standard output system */
        STDOUT = new PrintWriter((OutputStream) System.out);

        /* make the call */
        STDOUT.println(XSLTEXT.SomeUtils.TestMethod("abcde"));
        STDOUT.flush();

        System.exit(0);
    }

    /*------------------------------------------------------------------*/
    /* End of Class */
}

However when I try to access the utility class from the command-line via

java -jar C:\saxon8\saxon8.jar -TJ font.svg Process.xsl

I get the error

Loading XSLTEXT.SomeUtils
No Java class XSLTEXT.SomeUtils could be loaded
Error on line 25 of file:/C:/Documents%20and%20Settings/baryza/DocBook_Tools/XSLTEXT/Process.xsl:
  Cannot find a matching 1-argument function named {java:XSLTEXT.SomeUtils}TestMethod()
Transformation failed: Run-time errors were reported

The XSL stylesheet looks like this:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.1"  
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:util="java:XSLTEXT.SomeUtils">
               
<xsl:output method="xml"
            version="1.0"
            encoding="utf-8"
            indent="yes"
            standalone="yes"/>

<xsl:param name="NL">&#xa;</xsl:param>

<xsl:strip-space elements="*"/>

<!--
|
| top-level element
|
-->
<xsl:template match="/svg">
    <xsl:element name="length">
        <xsl:value-of select="util:TestMethod(string('abcd'))"
                      xmlns:util="java:XSLTEXT.SomeUtils"/>
    </xsl:element>
</xsl:template>

</xsl:stylesheet>

and the input file is very simple as well

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<svg width="100%" height="100%" >
   <defs>
      <font id="COUR" horiz-adv-x="1229">
         <font-face font-family="Courier New" units-per-em="2048" panose-1="2 7 3 9 2 2 5 2 4 4" ascent="1705" descent="-615" alphabetic="0"/>
         <missing-glyph d="M256 0V1280H1280V0H256ZM288 32H1248V1248H288V32Z"/>
         <glyph unicode=" " glyph-name="space"/>
      </font>
   </defs>
</svg>