junit-frames.xsl revision 0
0N/A<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
0N/A xmlns:lxslt="http://xml.apache.org/xslt"
0N/A xmlns:redirect="http://xml.apache.org/xalan/redirect"
0N/A xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"
0N/A<xsl:param name="output.dir" select="'.'"/>
0N/A <!-- create the index.html -->
0N/A <xsl:call-template name="index.html"/>
0N/A <!-- create the stylesheet.css -->
0N/A <xsl:call-template name="stylesheet.css"/>
0N/A <!-- create the overview-packages.html at the root -->
0N/A <xsl:apply-templates select="." mode="overview.packages"/>
0N/A <!-- create the all-packages.html at the root -->
0N/A <xsl:apply-templates select="." mode="all.packages"/>
0N/A <!-- create the all-classes.html at the root -->
0N/A <xsl:apply-templates select="." mode="all.classes"/>
0N/A <xsl:variable name="package.dir">
0N/A <!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
0N/A <!-- create a classes-list.html in the package directory -->
0N/A <xsl:call-template name="classes.list">
0N/A <!-- create a package-summary.html in the package directory -->
0N/A <xsl:call-template name="package.summary">
0N/A <!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
0N/A <xsl:for-each select="/testsuites/testsuite[@package = $name]">
0N/A <xsl:apply-templates select="." mode="class.details"/>
0N/A<xsl:template name="index.html">
0N/A <frame src="overview-frame.html" name="packageListFrame"/>
0N/A <frame src="allclasses-frame.html" name="classListFrame"/>
0N/A <frame src="overview-summary.html" name="classFrame"/>
0N/A 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.
0N/A<xsl:template name="stylesheet.css">
0N/Atable.details tr th{
0N/Atable.details tr td{
0N/A<xsl:template match="testsuite" mode="class.details">
0N/A <xsl:variable name="package.name" select="@package"/>
0N/A <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>
0N/A <title>Unit Test Results: <xsl:value-of select="$class.name"/></title>
0N/A <xsl:call-template name="create.stylesheet.link">
0N/A <script type="text/javascript" language="JavaScript">
0N/A <script type="text/javascript" language="JavaScript"><![CDATA[
0N/A var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
0N/A var doc = win.document.open();
0N/A doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }");
0N/A doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }");
0N/A doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }");
0N/A <h3>Class <xsl:value-of select="$class.name"/></h3>
0N/A <xsl:call-template name="testsuite.test.header"/>
0N/A <xsl:apply-templates select="." mode="print.test"/>
0N/A <xsl:call-template name="testcase.test.header"/>
0N/A <xsl:apply-templates select="./testcase" mode="print.test"/>
0N/A <xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute>
0N/A System.out »
0N/A System.err »
0N/A cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array();
0N/A cur['<xsl:value-of select="@name"/>'] = '<xsl:call-template name="JS-escape"><xsl:with-param name="string" select="@value"/></xsl:call-template>';
0N/A<xsl:template name="classes.list">
0N/A <xsl:call-template name="create.stylesheet.link">
0N/A <xsl:with-param name="package.name" select="$name"/>
0N/A <h2><a href="package-summary.html" target="classFrame">
0N/A <xsl:for-each select="/testsuites/testsuite[./@package = $name]">
0N/A<xsl:template match="testsuites" mode="all.classes">
0N/A <xsl:call-template name="create.stylesheet.link">
0N/A <xsl:with-param name="package.name"/>
0N/A <xsl:apply-templates select="testsuite" mode="all.classes">
0N/A<xsl:template match="testsuite" mode="all.classes">
0N/A <xsl:variable name="package.name" select="@package"/>
0N/A <xsl:if test="not($package.name='')">
0N/A <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
0N/A Creates an html file that contains a link to all package-summary.html files on
0N/A<xsl:template match="testsuites" mode="all.packages">
0N/A <xsl:call-template name="create.stylesheet.link">
0N/A <xsl:with-param name="package.name"/>
0N/A <h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
0N/A <xsl:apply-templates select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]" mode="all.packages">
0N/A<xsl:template match="testsuite" mode="all.packages">
0N/A <a href="./{translate(@package,'.','/')}/package-summary.html" target="classFrame">
0N/A<xsl:template match="testsuites" mode="overview.packages">
0N/A <xsl:call-template name="create.stylesheet.link">
0N/A <xsl:with-param name="package.name"/>
0N/A <xsl:attribute name="onload">open('allclasses-frame.html','classListFrame')</xsl:attribute>
0N/A <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
0N/A Note: <em>failures</em> are anticipated and checked for with assertions while <em>errors</em> are unanticipated.
0N/A <xsl:call-template name="testsuite.test.header"/>
0N/A <xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = current()/@package]"/>
0N/A <!-- display a failure if there is any failure/error in the package -->
0N/A <td><a href="./{translate(@package,'.','/')}/package-summary.html">
0N/A<xsl:template name="package.summary">
0N/A <xsl:call-template name="create.stylesheet.link">
0N/A <xsl:with-param name="package.name" select="$name"/>
0N/A <xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
0N/A <xsl:call-template name="class.metrics.header"/>
0N/A <xsl:apply-templates select="." mode="print.metrics"/>
0N/A <xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = $name]"/>
0N/A <xsl:call-template name="testsuite.test.header"/>
0N/A <xsl:apply-templates select="$insamepackage" mode="print.test">
0N/A <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
0N/A<xsl:template name="create.stylesheet.link">
0N/A <xsl:param name="package.name"/>
0N/A <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>
0N/A <td align="right">Designed for use with <a href="http://www.junit.org/">JUnit</a> and <a href="http://jakarta.apache.org/">Ant</a>.</td>
0N/A<xsl:template name="testsuite.test.header">
0N/A<xsl:template name="testcase.test.header">
0N/A<xsl:template match="testsuite" mode="print.test">
0N/A<xsl:template match="testcase" mode="print.test">