Browse Source

Bug 41742: <junitreport> stylesheets now supports setting the title by <param>s.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@514625 13f79535-47bb-0310-9956-ffa450edef68
master
Jan Materne 18 years ago
parent
commit
560433da5e
4 changed files with 26 additions and 4 deletions
  1. +3
    -0
      WHATSNEW
  2. +16
    -0
      docs/manual/OptionalTasks/junitreport.html
  3. +3
    -2
      src/etc/junit-frames.xsl
  4. +4
    -2
      src/etc/junit-noframes.xsl

+ 3
- 0
WHATSNEW View File

@@ -53,6 +53,9 @@ Fixed bugs:
* Synchonization issues in PropertyHelper. Bugzilla 41353.

* <concat binary="true" append="true"> did not append. Bugzilla 41399.
* <junitreport> xsl stylesheets allow setting the title used in <title> and <h1> tags by
using <report><param> element. Bugzilla 41742.

Other changes:
--------------


+ 16
- 0
docs/manual/OptionalTasks/junitreport.html View File

@@ -151,8 +151,24 @@ These tags can pass XSL parameters to the stylesheet.
<td valign="top">The param will only passed unless this property is set.</td>
<td align="center" valign="top">No</td>
</tr>
</table>

<p>The built-in stylesheets support the following parameters:</p>
<table width="60%" border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>XSL-Parameter</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">TITLE</td>
<td valign="top">Title used in &lt;title&gt; and &lt;h1&gt; tags</td>
<td align="center" valign="top">No. Defaults to <i>Unit Test Results.</i></td>
</tr>
</table>



<h3>Example of report</h3>
<blockquote>
<pre>&lt;junitreport todir=&quot;./reports&quot;&gt;


+ 3
- 2
src/etc/junit-frames.xsl View File

@@ -31,6 +31,7 @@

-->
<xsl:param name="output.dir" select="'.'"/>
<xsl:param name="TITLE">Unit Test Results.</xsl:param>


<xsl:template match="testsuites">
@@ -144,7 +145,7 @@
<xsl:template name="index.html">
<html>
<head>
<title>Unit Test Results.</title>
<title><xsl:value-of select="$TITLE"/></title>
</head>
<frameset cols="20%,80%">
<frameset rows="30%,70%">
@@ -688,7 +689,7 @@ h6 {

<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1>Unit Test Results</h1>
<h1><xsl:value-of select="$TITLE"/></h1>
<table width="100%">
<tr>
<td align="left"></td>


+ 4
- 2
src/etc/junit-noframes.xsl View File

@@ -21,6 +21,8 @@
limitations under the License.
-->

<xsl:param name="TITLE">Unit Test Results.</xsl:param>

<!--

Sample stylesheet to be used with Ant JUnitReport output.
@@ -32,7 +34,7 @@
<xsl:template match="testsuites">
<html>
<head>
<title>Unit Test Results</title>
<title><xsl:value-of select="$TITLE"/></title>
<style type="text/css">
body {
font:normal 68% verdana,arial,helvetica;
@@ -306,7 +308,7 @@

<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1>Unit Test Results</h1>
<h1><xsl:value-of select="$TITLE"/></h1>
<table width="100%">
<tr>
<td align="left"></td>


Loading…
Cancel
Save