ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Hoppe <>
Subject Problem with Style task and classloader
Date Mon, 10 Sep 2001 20:29:04 GMT

I'm stuck with a problem in the style task. I think I might have a rough
idea what's wrong and would like to get some input how I could fix this.

I'm trying to use Saxon as processor for the style task with the following

			      <pathelement location="lib/saxon.jar"/>

What happens is that TraXLiaison is correctly called but then happily calls
Xalan. If I read the code correctly this is because although TraXLiaison is
loaded with the ant classloader and build.sysclasspath is set to ignore, the
call to isParentFirst in loadClass returns true - quite natural, it's in
optional.jar, where else could it come from - so the whole JAXP stuff
happening in TraxLiaison runs in the system classloader. The system
classloader loads classes according to the delegation model, therefore it
can never find a class specified in the nested classpath of the style task.
If I'm right so far the nested classpath of the style task seems a little
bit pointless.
I first thought of adding an attribute to specify the transformer explicitly
and put jaxp into the nested classpath element, but of course this does not
help as TraXLiaison will actually never look into this nested classpath.

I'd like to write a fix for this, but I'm not sure how this could be
accomplished within the current XXXLiaison model. A possible approach might
be to load the jaxp TransformerFactory from the nested classpath together
with the parser in the TraXLiaison implementation, but that would not fit
the XSLTLiaison interface.

I hope that my problem is somehow understandable and tt would be nice if
someone could give me some hints how I could work on from here.



sitewaerts GmbH
Hebelstra├če 15
D-76133 Karlsruhe

Tel: +49 (721) 920 918 0
Fax: +49 (721) 920 918 29

View raw message