From e7734def8b0961af37c37eb1964a7e9ffdd052ca Mon Sep 17 00:00:00 2001
From: Antoine Levy-Lambert
Date: Fri, 30 Jun 2006 23:42:17 +0000
Subject: [PATCH] add support to nested XSL parameters in junitreport, Bugzilla
39708
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@418420 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 2 +
docs/manual/OptionalTasks/junitreport.html | 55 +-
.../taskdefs/optional/junitreport.xml | 43 +-
.../optional/junitreport/junit-frames.xsl | 877 ++++++++++++++++++
.../optional/junit/AggregateTransformer.java | 159 +++-
.../optional/junit/XMLResultAggregator.java | 4 +-
.../optional/junit/Xalan2Executor.java | 8 +-
.../optional/junit/XalanExecutor.java | 10 +-
.../optional/junit/JUnitReportTest.java | 43 +-
9 files changed, 1179 insertions(+), 22 deletions(-)
create mode 100644 src/etc/testcases/taskdefs/optional/junitreport/junit-frames.xsl
diff --git a/WHATSNEW b/WHATSNEW
index f9964f83e..43ec62a77 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -450,6 +450,8 @@ Other changes:
* now supports an outputencoding attribute. Bugzilla report 39697.
+* now supports nested XSL parameters. Bugzilla report 39708.
+
Changes from Ant 1.6.4 to Ant 1.6.5
===================================
diff --git a/docs/manual/OptionalTasks/junitreport.html b/docs/manual/OptionalTasks/junitreport.html
index 1450f05d0..f632c04a2 100644
--- a/docs/manual/OptionalTasks/junitreport.html
+++ b/docs/manual/OptionalTasks/junitreport.html
@@ -95,6 +95,40 @@ element.
No. Default to current directory |
+Nested Element of the report tag
+param
+Since Ant 1.7the report tag supports nested param tags.
+These tags can pass XSL parameters to the stylesheet.
+Parameters
+
+
+ Attribute |
+ Description |
+ Required |
+
+
+ name |
+ Name of the XSL parameter |
+ Yes |
+
+
+ expression |
+ Text value to be placed into the param.
+ Was originally intended to be an XSL expression. |
+ Yes |
+
+
+ if |
+ The param will only passed if this property is set. |
+ No |
+
+
+ unless |
+ The param will only passed unless this property is set. |
+ No |
+
+
+
Example of report
<junitreport todir="./reports">
@@ -107,9 +141,26 @@ element.
would generate a TESTS-TestSuites.xml file in the directory reports and
generate the default framed report in the directory report/html.
-
+Example of report with xsl params
+
+
+<junitreport todir="${outputdir}">
+ <fileset dir="${jrdir}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report todir="${outputdir}/html"
+ styledir="junitreport"
+ format="frames">
+ <param name="key1" expression="value1"/>
+ <param name="key2" expression="value2"/>
+ </report>
+</junitreport>
+
+
+This example requires a file called junitreport/junit-frames.xsl.
+ The XSL parameters key1 and key2 will be passed to the XSL transformation.
-Copyright © 2001-2002,2004-2005 The Apache Software Foundation. All rights
+
Copyright © 2001-2002,2004-2006 The Apache Software Foundation. All rights
Reserved.