ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Stirling" <scottstirl...@rcn.com>
Subject RE: Junitreport -- where is org.apache.xalan.xslt.extensions.Redirect?
Date Sun, 15 Dec 2002 01:13:20 GMT
> -----Original Message-----
> From: Nathan.S.Cuka@mail.sprint.com
> [mailto:Nathan.S.Cuka@mail.sprint.com]
[...]
>
> I am trying top get junitreport to work in Ant 1.5.1, but I am getting
> ClassNotFound exceptions for the
> org.apache.xalan.xslt.extensions.Redirect
> class.  I have Xalan-J 2.4.1 downloaded and the xalan.jar, xml-apis.jar,
> xercesImpl.jar, and xmlParserAPIs.jar are all in my classpath when
> I run the task, but it still fails.

By "in my classpath" do you mean in your CLASSPATH environment variable, or
Ant's lib dir, or a forking task in your build target?  Try putting
xalan.jar in %ANT_HOME%/lib with the other XML jars you mentioned.  I am
using the style/xslt tasks and they work fine (with Xalan 2.4.1) with Sun
and IBM 1.3.x JDKs.

> Furthermore, I have looked through
> all the jar files that come with the xalan 2.4.1 distro (BCEL, bsf,
> etc..) and can not find a reference to this class.

I know, if you look in the archive of this list on 12/8/2002 you can see
where I mentioned something similar, but in relation to a different problem.
Here's my observation:

[12/8/2002]
*******
... line 134 [of] the [JUnit] XSL file [...] invokes a custom XSL function:

<redirect:write file="{$output.dir}/{$package.dir}/{@name}.html">

Which is mapped in the XSL page to this class:

xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"

The only thing that jumps out there, but doesn't seem to really explain
anything, is that in the xalan.jar file, the Redirect class is actually in
org.apache.xalan.lib.Redirect.
*******

Given the package of the class and the xmlns:redirect attribute of the
stylesheet, I'm not sure why it works, but I don't think the namespace
necessarily has to map to a real class as long as it makes the redirect
namespace in the XSL unique.  I haven't looked at Xalan's source, but I
assume the loading of the Redirect class is resolved regardless of the
seeming misleading package shown in the XSL.

In any event, it works for me putting these jars in ANT_HOME/lib:
xalan.jar
xml-apis.jar
xercesImpl.jar

Scott Stirling



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message