Hello Morris,

thanks for your suggestion. It really seems to work. The only problem is that my extensions need a lot of other classes, so it really gets hairy. Also because these other classes are needed also by the rest of the application and I run into other classloader issues...

I would hope there would be some other way to solve this...
Extensions with namespaces, declared using getExtensionsTable().addExtensionNamespace
work really well in any JDK including 1.4.

-mikko

[EMAIL PROTECTED] wrote:
I think you can workaround this problem by adding your extension class to
the boot classpath of the JVM.

Example:
java -Xbootclasspath/p:your_extensions.jar

Morris Kwan
XSLT Development
IBM Toronto Lab
Tel: (905)413-3729
Email: [EMAIL PROTECTED]



Mikko Honkala <[EMAIL PROTECTED] To: [EMAIL PROTECTED] fi> cc: Subject: Xalan 2 bundled in JDK 1.4.1 -> how to use extension functions 12/03/2002 06:52 AM Please respond to xalan-dev


Hi,

I have another problem with Sun's decicion to embed Xalan into JDK 1.4:

I need to declare non-prefixed extension functions with
ExtensionTable.installFunction. This works in JDK1.3, but in JDK1.4 I
get the following error, when trying to execute these extensions. It
seems that from within the rt.jar it is not possible to reach extension
functions outside rt.jar with Class.forName.

It does not help if I drop xalan.jar into the endorsed dir.

Any ideas?

ERROR: javax.xml.transform.TransformerException:
java.lang.ClassNotFoundException:
fi/hut/tml/xsmiles/mlfc/xforms/xpath/FuncInstance

javax.xml.transform.TransformerException:
java.lang.ClassNotFoundException:
fi/hut/tml/xsmiles/mlfc/xforms/xpath/FuncInstance

at
org.apache.xpath.compiler.FuncLoader.getFunction(FuncLoader.java:154)
at
org.apache.xpath.compiler.FunctionTable.getFunction(FunctionTable.java:273)
at
org.apache.xpath.compiler.Compiler.compileFunction(Compiler.java:1055)
at
org.apache.xpath.compiler.Compiler.compile(Compiler.java:215)
at
org.apache.xpath.axes.FilterExprWalker.init(FilterExprWalker.java:117)
at
org.apache.xpath.axes.WalkerFactory.loadWalkers(WalkerFactory.java:152)
at
org.apache.xpath.axes.WalkingIterator.<init>(WalkingIterator.java:57)
at
org.apache.xpath.axes.WalkingIteratorSorted.<init>(WalkingIteratorSorted.java:106)

at
org.apache.xpath.axes.WalkerFactory.newDTMIterator(WalkerFactory.java:319)
at
org.apache.xpath.compiler.Compiler.locationPath(Compiler.java:677)
at
org.apache.xpath.compiler.Compiler.compile(Compiler.java:217)
at
org.apache.xpath.compiler.Compiler.compile(Compiler.java:163)
at org.apache.xpath.XPath.<init>(XPath.java:224)
at
fi.hut.tml.xsmiles.mlfc.xforms.CachedXPathAPIEx.eval(CachedXPathAPIEx.java:324)






Reply via email to