Author: jhm Date: Mon Mar 5 01:38:37 2007 New Revision: 514625 URL: http://svn.apache.org/viewvc?view=rev&rev=514625 Log: Bug 41742: <junitreport> stylesheets now supports setting the title by <param>s.
Modified: ant/core/trunk/WHATSNEW ant/core/trunk/docs/manual/OptionalTasks/junitreport.html ant/core/trunk/src/etc/junit-frames.xsl ant/core/trunk/src/etc/junit-noframes.xsl Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=514625&r1=514624&r2=514625 ============================================================================== --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Mon Mar 5 01:38:37 2007 @@ -53,6 +53,9 @@ * 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: -------------- Modified: ant/core/trunk/docs/manual/OptionalTasks/junitreport.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/OptionalTasks/junitreport.html?view=diff&rev=514625&r1=514624&r2=514625 ============================================================================== --- ant/core/trunk/docs/manual/OptionalTasks/junitreport.html (original) +++ ant/core/trunk/docs/manual/OptionalTasks/junitreport.html Mon Mar 5 01:38:37 2007 @@ -151,8 +151,24 @@ <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 <title> and <h1> 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><junitreport todir="./reports"> Modified: ant/core/trunk/src/etc/junit-frames.xsl URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/junit-frames.xsl?view=diff&rev=514625&r1=514624&r2=514625 ============================================================================== --- ant/core/trunk/src/etc/junit-frames.xsl (original) +++ ant/core/trunk/src/etc/junit-frames.xsl Mon Mar 5 01:38:37 2007 @@ -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 @@ <!-- 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> Modified: ant/core/trunk/src/etc/junit-noframes.xsl URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/junit-noframes.xsl?view=diff&rev=514625&r1=514624&r2=514625 ============================================================================== --- ant/core/trunk/src/etc/junit-noframes.xsl (original) +++ ant/core/trunk/src/etc/junit-noframes.xsl Mon Mar 5 01:38:37 2007 @@ -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> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]