[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Saxon: java extension functions
Your code is fine. I forgot common mistake number 4: running the transformation using the -jar option. This ignores the setting of the classpath. Run it using java net.sf.saxon.Transform and all will probably be well. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Richard Lewis [mailto:richardlewis@xxxxxxxxxxxxxx] > Sent: 15 February 2005 16:21 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Saxon: java extension functions > > Hello List, > > This is a Saxon question: > > I'm using Saxon 8.2B and I'm trying to add an extension > class, MyClass. > > <xsl:stylesheet version="2.0" ... > xmlns:my="java:MyClass"> > > and create an instance of it: > > <xsl:variable name="myClass" select="my:new($parameter)" /> > > and then call an instance function: > > <xsl:variable name="x" select="my:getX($myClass, $parameter)" /> > > But, running Saxon with the -TJ options, I get "No Java class MyClass > could be loaded". I've tried every namespace I could think of > ("java://MyClass", "MyClass", "java:/usr/share/java/MyClass", > "MyClass.class", etc.) but none of them work. The class is in the > classpath (I even tried compiling and running a little Java program > using it and that worked). > > Any ideas what I've done wrong? > > Cheers, > Richard
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|