I haven't had much luck using XSLT 2 for junitreport. I think Saxon has
a problem with the redirect extension, which looks specific to Xalan.
--- Nested Exception ---
; SystemID:
file:/c:/safe/projects/travelIdea/travel/work/docs/junit-frames.xsl;
Line#: 36; Column#: -1
net.sf.saxon.trans.DynamicError: Unknown extension element
at
net.sf.saxon.expr.ErrorExpression.evaluateItem(ErrorExpression.java:61)
If I pursue this further, I'll probably go the other way, setting the
timezone in XMLJUnitResultFormatter.
By the way, to get Ant to use Saxon, the xslt task's classpath did not
work for me, even with the factory element. It looks like this bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=41314
The way I would get Ant to use Saxon now, if I were going to keep
working on junitreport, is the hack described at the end of that bug:
setting the system property via SaxonLiaison. I like that better than
using the ANT_OPTS environment variable. Another way I like less is
adding -lib saxon8.jar to the ant script arguments and a factory element
to the xslt task. But the way I like least is Sun's usual endorsed
standards override mechanism, modifying the JRE (which I didn't even try).
Cheers,
11011011
[EMAIL PROTECTED] wrote:
You could use Ant's JUnitReport task just to create the consolidated
xml file (TESTS-TestSuites.xml),
and then call the XSLT task on that consolidated XML file.
You can than point the XSLT task's classpath(ref) attribute to your
favorite processor.
<junitreport todir="${build.dir}/testreports">
<fileset dir="${build.dir}/testresults">
<include name="TEST-*.xml"/>
</fileset>
...
</junitreport>
<xslt classpathref="yourXSLTProcessorref"
in="${build.dir}/testresults/TESTS-TestSuites.xml" .....
Regards, Jan
----- Original Message ----- From: "J. David Beutel" <[EMAIL PROTECTED]>
To: "Ant Developers List" <dev@ant.apache.org>
Sent: Tuesday, August 28, 2007 9:44 AM
Subject: Re: Setting Xalan to junitreport
Stefan Bodewig wrote:
Not using JDK 1.5's XSLTC is a good idea for so many reasons anyway.
You could use the usual endorsed standards override mechanism[1] to
swap in Saxon or just set the system property
javax.xml.transform.TransformerFactory prior to running Ant (you'd
probably use the ANT_OPTS environment variable for this).
Thanks for the advice!
I was happy to upgrade to JDK 1.5 and Ant 1.7 because I never liked
copying the Xalan and JUnit JARs into Ant's lib directory. My
current employer considers Ant, JDK, and Tomcat to be part of the
environment, but has some projects that require them to be
customized. This complicates working on different projects, so I
look for ways to avoid customizing the environment, keeping the
changes in the version-controlled files. I guess ANT_OPTS in a
custom script is my best option for XSLT 2.
Cheers,
11011011
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]