ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claas Thiele <>
Subject [PATCH] Allowing xslt task the use of extension classes not on the system classpath
Date Thu, 29 Jan 2004 21:03:32 GMT
xslt task loads extension classes from system classpath only (tested 
with xalan - xalan uses the context loader for loading extension classes).

I think, it will be a good idea that the classpath for extension classes 
can be configured in the ant script.

This patch sets the context loader used for loading the processor and 
resets it after processing.
So an extension class will be loaded from classpath specified in the 
classpath attribute of the xslt task.

Tested with Xalan/JDK1.4.2 and docbook extensions for xalan. Don't know 
how other processors are loading extension classes. There are 
disadvantages setting the context loader for processing?

There is another issue that can be solved in this way: switching xalan 
versions for jdk1.4 is crucial. It can be done setting endorsed.dirs 
while starting the jvm only.
Setting the AntClassLoader in isolated mode and specifying needed 
classes in classpath attribute of xslt task can solve this issue (not 

Dipl.-Inf. Claas Thiele          	EMail:
Konradstr. 58                    	Web:
04315 Leipzig                    	Tel.: +49 (0)341 68 70 92 29
GERMANY                          	Fax   +49 (0)341 68 70 92 30

View raw message