junit-frames-xalan1.xsl revision 94d29a8848130741ed9e35078f6b814abac06fcc
de4157257515400c2c25373591135f110227b68cvboxsync<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
de4157257515400c2c25373591135f110227b68cvboxsync xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"
de4157257515400c2c25373591135f110227b68cvboxsync<xsl:output method="html" indent="yes" encoding="UTF-8"/>
de4157257515400c2c25373591135f110227b68cvboxsync<xsl:decimal-format decimal-separator="." grouping-separator=","/>
de4157257515400c2c25373591135f110227b68cvboxsync Licensed to the Apache Software Foundation (ASF) under one or more
de4157257515400c2c25373591135f110227b68cvboxsync contributor license agreements. See the NOTICE file distributed with
a50fbf5e37052d5105a3d5eb3e0a064d1e202920vboxsync this work for additional information regarding copyright ownership.
de4157257515400c2c25373591135f110227b68cvboxsync The ASF licenses this file to You under the Apache License, Version 2.0
de4157257515400c2c25373591135f110227b68cvboxsync (the "License"); you may not use this file except in compliance with
de4157257515400c2c25373591135f110227b68cvboxsync the License. You may obtain a copy of the License at
de4157257515400c2c25373591135f110227b68cvboxsync Unless required by applicable law or agreed to in writing, software
de4157257515400c2c25373591135f110227b68cvboxsync distributed under the License is distributed on an "AS IS" BASIS,
de4157257515400c2c25373591135f110227b68cvboxsync WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
de4157257515400c2c25373591135f110227b68cvboxsync See the License for the specific language governing permissions and
de4157257515400c2c25373591135f110227b68cvboxsync limitations under the License.
6f1b41a8c39a26e6aab27c810222ab59c721c3c9vboxsync Sample stylesheet to be used with Ant JUnitReport output.
6f1b41a8c39a26e6aab27c810222ab59c721c3c9vboxsync It creates a set of HTML files a la javadoc where you can browse easily
6f1b41a8c39a26e6aab27c810222ab59c721c3c9vboxsync through all packages and classes.
6f1b41a8c39a26e6aab27c810222ab59c721c3c9vboxsync <!-- create the index.html -->
<!-- create the stylesheet.css -->
<!-- create the overview-packages.html at the root -->
<!-- create the all-packages.html at the root -->
<!-- create the all-classes.html at the root -->
<!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
<!-- create a classes-list.html in the package directory -->
<!-- create a package-summary.html in the package directory -->
<!-- for each class, creates a @name.html -->
<!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
table.details tr th{
table.details tr td{
<xsl:variable name="class.name"><xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></xsl:variable>
var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
var doc = win.document;
doc.open();
doc.write("<html><head><title>Properties of " + name + "</title>");
doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000; }");
doc.write("table tr td, table tr th { font-size: 68%; }");
doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }");
doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }");
doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }");
doc.write("h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica }");
doc.write("</style>");
doc.write("</head><body>");
doc.write("<h3>Properties of " + name + "</h3>");
doc.write("<div align=\"right\"><a href=\"javascript:window.close();\">Close</a></div>");
doc.write("<table class='properties'>");
doc.write("<tr><th>Name</th><th>Value</th></tr>");
doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>");
doc.write("</table>");
doc.write("</body></html>");
doc.close();
win.focus();
<xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute>
System.out »
System.err »
cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array();
cur['<xsl:value-of select="@name"/>'] = '<xsl:call-template name="JS-escape"><xsl:with-param name="string" select="@value"/></xsl:call-template>';
Creates an all-classes.html file that contains a link to all package-summary.html
Creates an html file that contains a link to all package-summary.html files on
<xsl:apply-templates select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]" mode="all.packages">
<xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
Note: <em>failures</em> are anticipated and checked for with assertions while <em>errors</em> are unanticipated.
<xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = current()/@package]"/>
<xsl:call-template name="class.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
transform string like a.b.c to ../../../
<link rel="stylesheet" type="text/css" title="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></link>
<td align="right">Designed for use with <a href="http://www.junit.org/">JUnit</a> and <a href="http://ant.apache.org/">Ant</a>.</td>