From: Xuan B. <med...@us...> - 2008-01-25 19:21:24
|
Update of /cvsroot/tm4j/tm4j/lib/ant/apache-ant-1.7.0/etc In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12860/lib/ant/apache-ant-1.7.0/etc Added Files: ant-bootstrap.jar changelog.xsl coverage-frames.xsl jdepend-frames.xsl jdepend.xsl junit-frames-xalan1.xsl junit-frames.xsl junit-noframes.xsl log.xsl maudit-frames.xsl mmetrics-frames.xsl tagdiff.xsl Log Message: Update 4 years old ant. --- NEW FILE: jdepend.xsl --- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <xsl:output method="html" indent="yes" encoding="US-ASCII"/> <xsl:template match="JDepend"> <html> <head> <title>JDepend Analysis</title> <style type="text/css"> body { font:normal 68% verdana,arial,helvetica; color:#000000; } table tr td, tr th { font-size: 68%; } table.details tr th{ font-weight: bold; text-align:left; background:#a6caf0; } table.details tr td{ background:#eeeee0; } p { line-height:1.5em; margin-top:0.5em; margin-bottom:1.0em; margin-left:2em; margin-right:2em; } h1 { margin: 0px 0px 5px; font: 165% verdana,arial,helvetica } h2 { margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica } h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica } h4 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } h5 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } h6 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } .Error { font-weight:bold; color:red; } .Failure { font-weight:bold; color:purple; } .Properties { text-align:right; } </style> </head> <body> <!--h1>JDepend Report</h1> <ul> <xsl:for-each select="./Packages/Package"> <xsl:sort select="@name"/> <li><xsl:value-of select="@name"/></li> </xsl:for-each> </ul--> <h1><a name="top">JDepend Analysis</a></h1> <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</p> <hr size="2" /> <table width="100%"><tr><td> <a name="NVsummary"><h2>Summary</h2></a> </td><td align="right"> [<a href="#NVsummary">summary</a>] [<a href="#NVpackages">packages</a>] [<a href="#NVcycles">cycles</a>] [<a href="#NVexplanations">explanations</a>] </td></tr></table> <table width="100%" class="details"> <tr> <th>Package</th> <th>Total Classes</th> <th><a href="#EXnumber">Abstract Classes</a></th> <th><a href="#EXnumber">Concrete Classes</a></th> <th><a href="#EXafferent">Afferent Couplings</a></th> <th><a href="#EXefferent">Efferent Couplings</a></th> <th><a href="#EXabstractness">Abstractness</a></th> <th><a href="#EXinstability">Instability</a></th> <th><a href="#EXdistance">Distance</a></th> </tr> <xsl:for-each select="./Packages/Package"> <xsl:if test="count(error) = 0"> <tr> <td align="left"> <a> <xsl:attribute name="href">#PK<xsl:value-of select="@name"/> </xsl:attribute> <xsl:value-of select="@name"/> </a> </td> <td align="right"><xsl:value-of select="Stats/TotalClasses"/></td> <td align="right"><xsl:value-of select="Stats/AbstractClasses"/></td> <td align="right"><xsl:value-of select="Stats/ConcreteClasses"/></td> <td align="right"><xsl:value-of select="Stats/Ca"/></td> <td align="right"><xsl:value-of select="Stats/Ce"/></td> <td align="right"><xsl:value-of select="Stats/A"/></td> <td align="right"><xsl:value-of select="Stats/I"/></td> <td align="right"><xsl:value-of select="Stats/D"/></td> </tr> </xsl:if> </xsl:for-each> <xsl:for-each select="./Packages/Package"> <xsl:if test="count(error) > 0"> <tr> <td align="left"> <xsl:value-of select="@name"/> </td> <td align="left" colspan="8"><xsl:value-of select="error"/></td> </tr> </xsl:if> </xsl:for-each> </table> <table width="100%"><tr><td> <a name="NVpackages"><h2>Packages</h2></a> </td><td align="right"> [<a href="#NVsummary">summary</a>] [<a href="#NVpackages">packages</a>] [<a href="#NVcycles">cycles</a>] [<a href="#NVexplanations">explanations</a>] </td></tr></table> <xsl:for-each select="./Packages/Package"> <xsl:if test="count(error) = 0"> <h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute> <xsl:value-of select="@name"/></a></h3> <table width="100%"><tr> <td><a href="#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td> <td><a href="#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td> <td><a href="#EXabstractness">Abstractness</a>: <xsl:value-of select="Stats/A"/></td> <td><a href="#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td> <td><a href="#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td> </tr></table> <table width="100%" class="details"> <tr> <th>Abstract Classes</th> <th>Concrete Classes</th> <th>Used by Packages</th> <th>Uses Packages</th> </tr> <tr> <td valign="top" width="25%"> <xsl:if test="count(AbstractClasses/Class)=0"> <i>None</i> </xsl:if> <xsl:for-each select="AbstractClasses/Class"> <xsl:value-of select="node()"/><br/> </xsl:for-each> </td> <td valign="top" width="25%"> <xsl:if test="count(ConcreteClasses/Class)=0"> <i>None</i> </xsl:if> <xsl:for-each select="ConcreteClasses/Class"> <xsl:value-of select="node()"/><br/> </xsl:for-each> </td> <td valign="top" width="25%"> <xsl:if test="count(UsedBy/Package)=0"> <i>None</i> </xsl:if> <xsl:for-each select="UsedBy/Package"> <a> <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute> <xsl:value-of select="node()"/> </a><br/> </xsl:for-each> </td> <td valign="top" width="25%"> <xsl:if test="count(DependsUpon/Package)=0"> <i>None</i> </xsl:if> <xsl:for-each select="DependsUpon/Package"> <a> <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute> <xsl:value-of select="node()"/> </a><br/> </xsl:for-each> </td> </tr> </table> </xsl:if> </xsl:for-each> <table width="100%"><tr><td> <a name="NVcycles"><h2>Cycles</h2></a> </td><td align="right"> [<a href="#NVsummary">summary</a>] [<a href="#NVpackages">packages</a>] [<a href="#NVcycles">cycles</a>] [<a href="#NVexplanations">explanations</a>] </td></tr></table> <xsl:if test="count(Cycles/Package) = 0"> <p>There are no cyclic dependancies.</p> </xsl:if> <xsl:for-each select="Cycles/Package"> <h3><xsl:value-of select="@Name"/></h3><p> <xsl:for-each select="Package"> <xsl:value-of select="."/><br/> </xsl:for-each></p> </xsl:for-each> <table width="100%"><tr><td> <a name="NVexplanations"><h2>Explanations</h2></a> </td><td align="right"> [<a href="#NVsummary">summary</a>] [<a href="#NVpackages">packages</a>] [<a href="#NVcycles">cycles</a>] [<a href="#NVexplanations">explanations</a>] </td></tr></table> <p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p> <h3><a name="EXnumber">Number of Classes</a></h3> <p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p> <h3><a name="EXafferent">Afferent Couplings</a></h3> <p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p> <h3><a name="EXefferent">Efferent Couplings</a></h3> <p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p> <h3><a name="EXabstractness">Abstractness</a></h3> <p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p> <p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p> <h3><a name="EXinstability">Instability</a></h3> <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p> <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p> <h3><a name="EXdistance">Distance</a></h3> <p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p> <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p> <p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p> </body> </html> </xsl:template> </xsl:stylesheet> --- NEW FILE: tagdiff.xsl --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- a stylesheet to display changelogs ala netbeans --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="title"/> <xsl:param name="module"/> <xsl:param name="cvsweb"/> <xsl:output method="html" indent="yes"/> <!-- Copy standard document elements. Elements that should be ignored must be filtered by apply-templates tags. --> <xsl:template match="*"> <xsl:copy> <xsl:copy-of select="attribute::*[. != '']"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="tagdiff"> <html> <head> <title><xsl:value-of select="$title"/></title> <style type="text/css"> body, p { font-family: verdana,arial,helvetica; font-size: 80%; color:#000000; } .dateAndAuthor { font-family: verdana,arial,helvetica; font-size: 80%; font-weight: bold; text-align:left; background:#a6caf0; } tr, td{ font-family: verdana,arial,helvetica; font-size: 80%; background:#eeeee0; } </style> </head> <body link="#000000" alink="#000000" vlink="#000000" text="#000000"> <h1> <a name="top"><xsl:value-of select="$title"/></a> </h1> Tagdiff between <xsl:value-of select="@startTag"/> <xsl:value-of select="@startDate"/> and <xsl:value-of select="@endTag"/> <xsl:value-of select="@endDate"/> <p align="right">Designed for use with <a href="http://ant.apache.org/">Ant</a>.</p> <hr size="2"/> <a name="TOP"/> <table width="100%"> <tr> <td align="right"> <a href="#New">New Files</a> | <a href="#Modified">Modified Files</a> | <a href="#Removed">Removed Files</a> </td> </tr> </table> <table border="0" width="100%" cellpadding="3" cellspacing="1"> <xsl:call-template name="show-entries"> <xsl:with-param name="title">New Files</xsl:with-param> <xsl:with-param name="anchor">New</xsl:with-param> <xsl:with-param name="entries" select=".//entry[file/revision][not(file/prevrevision)]"/> </xsl:call-template> <xsl:call-template name="show-entries"> <xsl:with-param name="title">Modified Files</xsl:with-param> <xsl:with-param name="anchor">Modified</xsl:with-param> <xsl:with-param name="entries" select=".//entry[file/revision][file/prevrevision]"/> </xsl:call-template> <!-- change to entries select to address bug #36827 --> <xsl:call-template name="show-entries"> <xsl:with-param name="title">Removed Files</xsl:with-param> <xsl:with-param name="anchor">Removed</xsl:with-param> <xsl:with-param name="entries" select=".//entry[not(file/revision)][file/prevrevision]"/> </xsl:call-template> </table> </body> </html> </xsl:template> <xsl:template name="show-entries"> <xsl:param name="title"/> <xsl:param name="anchor"/> <xsl:param name="entries"/> <tr> <td colspan="2" class="dateAndAuthor"> <a> <xsl:attribute name="name"><xsl:value-of select="$anchor"/></xsl:attribute> <xsl:value-of select="$title"/> - <xsl:value-of select="count($entries)"/> entries </a> <a href="#TOP">(back to top)</a> </td> </tr> <tr> <td width="20"> <xsl:text> </xsl:text> </td> <td> <ul> <xsl:apply-templates select="$entries"/> </ul> </td> </tr> </xsl:template> <xsl:template match="entry"> <xsl:apply-templates select="file"/> </xsl:template> <xsl:template match="date"> <i><xsl:value-of select="."/></i> </xsl:template> <xsl:template match="time"> <i><xsl:value-of select="."/></i> </xsl:template> <xsl:template match="author"> <i> <a> <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute> <xsl:value-of select="."/> </a> </i> </xsl:template> <xsl:template match="file"> <li> <a target="_new"> <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" /></xsl:attribute> <xsl:value-of select="name" /> </a> <xsl:if test="string-length(prevrevision) > 0 or string-length(revision) > 0"> <xsl:text> </xsl:text> <a target="_new"> <xsl:choose> <xsl:when test="string-length(prevrevision) = 0 "> <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&content-type=text/x-cvsweb-markup</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&r2=<xsl:value-of select="prevrevision"/>&diff_format=h</xsl:attribute> </xsl:otherwise> </xsl:choose> (<xsl:value-of select="revision"/>) </a> </xsl:if> </li> </xsl:template> <!-- Any elements within a msg are processed, so that we can preserve HTML tags. --> <xsl:template match="msg"> <b><xsl:apply-templates/></b> </xsl:template> </xsl:stylesheet> --- NEW FILE: ant-bootstrap.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mmetrics-frames.xsl --- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:xalan="http://xml.apache.org/xalan" xmlns:redirect="org.apache.xalan.lib.Redirect" exclude-result-prefixes="xalan" extension-element-prefixes="redirect"> <xsl:output method="html" indent="yes" encoding="US-ASCII"/> <xsl:decimal-format decimal-separator="." grouping-separator="," /> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software [...986 lines suppressed...] </xsl:template> <xsl:template match="@nocl"> <xsl:call-template name="display-value"> <xsl:with-param name="value" select="current()"/> <xsl:with-param name="max" select="$nocl.max"/> </xsl:call-template> </xsl:template> <xsl:template name="display-value"> <xsl:param name="value"/> <xsl:param name="max"/> <xsl:if test="$value > $max"> <xsl:attribute name="class">Error</xsl:attribute> </xsl:if> <xsl:value-of select="$value"/> </xsl:template> </xsl:stylesheet> --- NEW FILE: changelog.xsl --- <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <xsl:param name="title"/> <xsl:param name="module"/> <xsl:param name="cvsweb"/> <xsl:output method="html" indent="yes" encoding="US-ASCII" doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html401/strict.dtd"/> <!-- Copy standard document elements. Elements that should be ignored must be filtered by apply-templates tags. --> <xsl:template match="*"> <xsl:copy> <xsl:copy-of select="attribute::*[. != '']"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="changelog"> <html> <head> <title><xsl:value-of select="$title"/></title> <style type="text/css"> body, p { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 80%; color: #000000; background-color: #ffffff; } tr, td { font-family: Verdana, Arial, Helvetica, sans-serif; background: #eeeee0; } td { padding-left: 20px; } .dateAndAuthor { font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; text-align: left; background: #a6caf0; padding-left: 3px; } a { color: #000000; } pre { font-weight: bold; } </style> </head> <body> <h1> <a name="top"><xsl:value-of select="$title"/></a> </h1> <p style="text-align: right">Designed for use with <a href="http://ant.apache.org/">Apache Ant</a>.</p> <hr/> <table border="0" width="100%" cellspacing="1"> <xsl:apply-templates select=".//entry"> <xsl:sort select="date" data-type="text" order="descending"/> <xsl:sort select="time" data-type="text" order="descending"/> </xsl:apply-templates> </table> </body> </html> </xsl:template> <xsl:template match="entry"> <tr> <td class="dateAndAuthor"> <xsl:value-of select="date"/><xsl:text> </xsl:text><xsl:value-of select="time"/><xsl:text> </xsl:text><xsl:value-of select="author"/> </td> </tr> <tr> <td> <pre> <xsl:apply-templates select="msg"/></pre> <ul> <xsl:apply-templates select="file"/> </ul> </td> </tr> </xsl:template> <xsl:template match="date"> <i><xsl:value-of select="."/></i> </xsl:template> <xsl:template match="time"> <i><xsl:value-of select="."/></i> </xsl:template> <xsl:template match="author"> <i> <a> <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute> <xsl:value-of select="."/></a> </i> </xsl:template> <xsl:template match="file"> <li> <a> <xsl:choose> <xsl:when test="string-length(prevrevision) = 0 "> <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&content-type=text/x-cvsweb-markup</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&r2=<xsl:value-of select="prevrevision"/></xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:value-of select="name" /> (<xsl:value-of select="revision"/>)</a> </li> </xsl:template> <!-- Any elements within a msg are processed, so that we can preserve HTML tags. --> <xsl:template match="msg"> <xsl:apply-templates/> </xsl:template> </xsl:stylesheet> --- NEW FILE: log.xsl --- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" indent="yes" encoding="US-ASCII"/> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- The purpose have this XSL is to provide a nice way to look at the output from the Ant XmlLogger (ie: ant -listener org.apache.tools.ant.XmlLogger ) @author <a href="mailto:sba...@ap...">Stephane Bailliez</a> --> <xsl:decimal-format decimal-separator="." grouping-separator="," /> <xsl:template match="/"> <html> <head> <style type="text/css"> .bannercell { border: 0px; padding: 0px; } body { margin: 0; font:normal 100% arial,helvetica,sanserif; background-color:#FFFFFF; color:#000000; } table.status { font:bold 80% arial,helvetica,sanserif; background-color:#525D76; color:#ffffff; } table.log tr td, tr th { font-size: 80%; } .error { color:red; } .warn { color:brown; } .info { color:gray; } .debug{ color:gray; } .failed { font-size:80%; background-color: red; color:#FFFFFF; font-weight: bold } .complete { font-size:80%; background-color: #525D76; color:#FFFFFF; font-weight: bold } .a td { background: #efefef; } .b td { background: #fff; } th, td { text-align: left; vertical-align: top; } th { background: #ccc; color: black; } table, th, td { border: none } h3 { font:bold 80% arial,helvetica,sanserif; background: #525D76; color: white; text-decoration: none; padding: 5px; margin-right: 2px; margin-left: 2px; margin-bottom: 0; } </style> </head> <body> <!-- jakarta logo --> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" class="bannercell"> <a href="http://jakarta.apache.org/"> <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/> </a> </td> <td style="text-align:right;vertical-align:bottom"> <a href="http://ant.apache.org/">Apache Ant</a> </td> </tr> </table> <table border="0" width="100%"> <tr><td><hr noshade="yes" size="1"/></td></tr> </table> <xsl:apply-templates select="build"/> </body> </html> </xsl:template> <xsl:template match="build"> <!-- build status --> <table width="100%"> <xsl:attribute name="class"> <xsl:if test="@error">failed</xsl:if> <xsl:if test="not(@error)">complete</xsl:if> </xsl:attribute> <tr> <xsl:if test="@error"> <td nowrap="yes">Build Failed</td> </xsl:if> <xsl:if test="not(@error)"> <td nowrap="yes">Build Complete</td> </xsl:if> <td style="text-align:right" nowrap="yes">Total Time: <xsl:value-of select="@time"/></td> </tr> <tr> <td colspan="2"> <xsl:if test="@error"> <tt><xsl:value-of select="@error"/></tt><br/> <i style="font-size:80%">See the <a href="#stacktrace" alt="Click for details">stacktrace</a>.</i> </xsl:if> </td> </tr> </table> <table border="1" cellspacing="2" cellpadding="3" width="100%" style="font-size:80%"> <tr class="a"><td width="1">ant.file</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.file')], '->')"/></td></tr> <tr class="b"><td width="1">ant.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.version')], '->')"/></td></tr> <tr class="a"><td width="1">java.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'java.vm.version')], '->')"/></td></tr> <tr class="b"><td width="1">os.name</td><td><xsl:value-of select="substring-after(//message[contains(text(),'os.name')], '->')"/></td></tr> </table> <!-- build information --> <h3>Build events</h3> <table class="log" border="1" cellspacing="2" cellpadding="3" width="100%"> <tr> <th nowrap="yes" align="left" width="1%">target</th> <th nowrap="yes" align="left" width="1%">task</th> <th nowrap="yes" align="left">message</th> </tr> <xsl:apply-templates select=".//message[@priority != 'debug']"/> </table> <p> <!-- stacktrace --> <xsl:if test="stacktrace"> <a name="stacktrace"/> <h3>Error details</h3> <table width="100%"> <tr><td> <pre><xsl:value-of select="stacktrace"/></pre> </td></tr> </table> </xsl:if> </p> </xsl:template> <!-- report every message but those with debug priority --> <xsl:template match="message[@priority!='debug']"> <tr valign="top"> <!-- alternated row style --> <xsl:attribute name="class"> <xsl:if test="position() mod 2 = 1">a</xsl:if> <xsl:if test="position() mod 2 = 0">b</xsl:if> </xsl:attribute> <td nowrap="yes" width="1%"><xsl:value-of select="../../@name"/></td> <td nowrap="yes" style="text-align:right" width="1%">[ <xsl:value-of select="../@name"/> ]</td> <td class="{@priority}" nowrap="yes"> <xsl:value-of select="text()"/> </td> </tr> </xsl:template> </xsl:stylesheet> --- NEW FILE: junit-frames.xsl --- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils" extension-element-prefixes="redirect"> <xsl:output method="html" indent="yes" encoding="US-ASCII"/> <xsl:decimal-format decimal-separator="." grouping-separator=","/> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- Sample stylesheet to be used with Ant JUnitReport output. It creates a set of HTML files a la javadoc where you can browse easily through all packages and classes. --> <xsl:param name="output.dir" select="'.'"/> <xsl:template match="testsuites"> <!-- create the index.html --> <redirect:write file="{$output.dir}/index.html"> <xsl:call-template name="index.html"/> </redirect:write> <!-- create the stylesheet.css --> <redirect:write file="{$output.dir}/stylesheet.css"> <xsl:call-template name="stylesheet.css"/> </redirect:write> <!-- create the overview-packages.html at the root --> <redirect:write file="{$output.dir}/overview-summary.html"> <xsl:apply-templates select="." mode="overview.packages"/> </redirect:write> <!-- create the all-packages.html at the root --> <redirect:write file="{$output.dir}/overview-frame.html"> <xsl:apply-templates select="." mode="all.packages"/> </redirect:write> <!-- create the all-classes.html at the root --> <redirect:write file="{$output.dir}/allclasses-frame.html"> <xsl:apply-templates select="." mode="all.classes"/> </redirect:write> <!-- create the all-tests.html at the root --> <redirect:write file="{$output.dir}/all-tests.html"> <xsl:apply-templates select="." mode="all.tests"/> </redirect:write> <!-- create the alltests-fails.html at the root --> <redirect:write file="{$output.dir}/alltests-fails.html"> <xsl:apply-templates select="." mode="all.tests"> <xsl:with-param name="type" select="'fails'"/> </xsl:apply-templates> </redirect:write> <!-- create the alltests-errors.html at the root --> <redirect:write file="{$output.dir}/alltests-errors.html"> <xsl:apply-templates select="." mode="all.tests"> <xsl:with-param name="type" select="'errors'"/> </xsl:apply-templates> </redirect:write> <!-- process all packages --> <xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> <xsl:call-template name="package"> <xsl:with-param name="name" select="@package"/> </xsl:call-template> </xsl:for-each> </xsl:template> <xsl:template name="package"> <xsl:param name="name"/> <xsl:variable name="package.dir"> <xsl:if test="not($name = '')"><xsl:value-of select="translate($name,'.','/')"/></xsl:if> <xsl:if test="$name = ''">.</xsl:if> </xsl:variable> <!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> --> <!-- create a classes-list.html in the package directory --> <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html"> <xsl:call-template name="classes.list"> <xsl:with-param name="name" select="$name"/> </xsl:call-template> </redirect:write> <!-- create a package-summary.html in the package directory --> <redirect:write file="{$output.dir}/{$package.dir}/package-summary.html"> <xsl:call-template name="package.summary"> <xsl:with-param name="name" select="$name"/> </xsl:call-template> </redirect:write> <!-- for each class, creates a @name.html --> <!-- @bug there will be a problem with inner classes having the same name, it will be overwritten --> <xsl:for-each select="/testsuites/testsuite[@package = $name]"> <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}.html"> <xsl:apply-templates select="." mode="class.details"/> </redirect:write> <xsl:if test="string-length(./system-out)!=0"> <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}-out.txt"> <xsl:value-of disable-output-escaping="yes" select="./system-out"/> </redirect:write> </xsl:if> <xsl:if test="string-length(./system-err)!=0"> <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}-err.txt"> <xsl:value-of disable-output-escaping="yes" select="./system-err"/> </redirect:write> </xsl:if> <xsl:if test="@failures != 0"> <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}-fails.html"> <xsl:apply-templates select="." mode="class.details"> <xsl:with-param name="type" select="'fails'"/> </xsl:apply-templates> </redirect:write> </xsl:if> <xsl:if test="@errors != 0"> <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@name}-errors.html"> <xsl:apply-templates select="." mode="class.details"> <xsl:with-param name="type" select="'errors'"/> </xsl:apply-templates> </redirect:write> </xsl:if> </xsl:for-each> </xsl:template> <xsl:template name="index.html"> <html> <head> <title>Unit Test Results.</title> </head> <frameset cols="20%,80%"> <frameset rows="30%,70%"> <frame src="overview-frame.html" name="packageListFrame"/> <frame src="allclasses-frame.html" name="classListFrame"/> </frameset> <frame src="overview-summary.html" name="classFrame"/> <noframes> <h2>Frame Alert</h2> <p> 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. </p> </noframes> </frameset> </html> </xsl:template> <!-- this is the stylesheet css to use for nearly everything --> <xsl:template name="stylesheet.css"> body { font:normal 68% verdana,arial,helvetica; color:#000000; } table tr td, table tr th { font-size: 68%; } table.details tr th{ font-weight: bold; text-align:left; background:#a6caf0; } table.details tr td{ background:#eeeee0; } p { line-height:1.5em; margin-top:0.5em; margin-bottom:1.0em; } h1 { margin: 0px 0px 5px; font: 165% verdana,arial,helvetica } h2 { margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica } h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica } h4 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } h5 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } h6 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } .Error { font-weight:bold; color:red; } .Failure { font-weight:bold; color:purple; } .Properties { text-align:right; } </xsl:template> <!-- Create list of all/failed/errored tests --> <xsl:template match="testsuites" mode="all.tests"> <xsl:param name="type" select="'all'"/> <html> <xsl:variable name="title"> <xsl:choose> <xsl:when test="$type = 'fails'"> <xsl:text>All Failures</xsl:text> </xsl:when> <xsl:when test="$type = 'errors'"> <xsl:text>All Errors</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>All Tests</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:variable> <head> <title>Unit Test Results: <xsl:value-of select="$title"/></title> <xsl:call-template name="create.stylesheet.link"> <xsl:with-param name="package.name"/> </xsl:call-template> </head> <body> <xsl:attribute name="onload">open('allclasses-frame.html','classListFrame')</xsl:attribute> <xsl:call-template name="pageHeader"/> <h2><xsl:value-of select="$title"/></h2> <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> <xsl:call-template name="testcase.test.header"> <xsl:with-param name="show.class" select="'yes'"/> </xsl:call-template> <!-- test can even not be started at all (failure to load the class) so report the error directly --> <xsl:if test="./error"> <tr class="Error"> <td colspan="4"> <xsl:apply-templates select="./error"/> </td> </tr> </xsl:if> <xsl:choose> <xsl:when test="$type = 'fails'"> <xsl:apply-templates select=".//testcase[failure]" mode="print.test"> <xsl:with-param name="show.class" select="'yes'"/> </xsl:apply-templates> </xsl:when> <xsl:when test="$type = 'errors'"> <xsl:apply-templates select=".//testcase[error]" mode="print.test"> <xsl:with-param name="show.class" select="'yes'"/> </xsl:apply-templates> </xsl:when> <xsl:otherwise> <xsl:apply-templates select=".//testcase" mode="print.test"> <xsl:with-param name="show.class" select="'yes'"/> </xsl:apply-templates> </xsl:otherwise> </xsl:choose> </table> </body> </html> </xsl:template> <!-- ====================================================================== This page is created for every testsuite class. It prints a summary of the testsuite and detailed information about testcase methods. ====================================================================== --> <xsl:template match="testsuite" mode="class.details"> <xsl:param name="type" select="'all'"/> <xsl:variable name="package.name" select="@package"/> <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> <html> <head> <title>Unit Test Results: <xsl:value-of select="$class.name"/></title> <xsl:call-template name="create.stylesheet.link"> <xsl:with-param name="package.name" select="$package.name"/> </xsl:call-template> <script type="text/javascript" language="JavaScript"> var TestCases = new Array(); var cur; <xsl:apply-templates select="properties"/> </script> <script type="text/javascript" language="JavaScript"><![CDATA[ function displayProperties (name) { 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("<style type=\"text/css\">"); 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>"); for (prop in TestCases[name]) { doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>"); } doc.write("</table>"); doc.write("</body></html>"); doc.close(); win.focus(); } ]]> </script> </head> <body> <xsl:call-template name="pageHeader"/> <h3>Class <xsl:value-of select="$class.name"/></h3> <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> <xsl:call-template name="testsuite.test.header"/> <xsl:apply-templates select="." mode="print.test"/> </table> <xsl:choose> <xsl:when test="$type = 'fails'"> <h2>Failures</h2> </xsl:when> <xsl:when test="$type = 'errors'"> <h2>Errors</h2> </xsl:when> <xsl:otherwise> <h2>Tests</h2> </xsl:otherwise> </xsl:choose> <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> <xsl:call-template name="testcase.test.header"/> <!-- test can even not be started at all (failure to load the class) so report the error directly --> <xsl:if test="./error"> <tr class="Error"> <td colspan="4"><xsl:apply-templates select="./error"/></td> </tr> </xsl:if> <xsl:choose> <xsl:when test="$type = 'fails'"> <xsl:apply-templates select="./testcase[failure]" mode="print.test"/> </xsl:when> <xsl:when test="$type = 'errors'"> <xsl:apply-templates select="./testcase[error]" mode="print.test"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="./testcase" mode="print.test"/> </xsl:otherwise> </xsl:choose> </table> <div class="Properties"> <a> <xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute> Properties » </a> </div> <xsl:if test="string-length(./system-out)!=0"> <div class="Properties"> <a> <xsl:attribute name="href">./<xsl:value-of select="@id"/>_<xsl:value-of select="@name"/>-out.txt</xsl:attribute> System.out » </a> </div> </xsl:if> <xsl:if test="string-length(./system-err)!=0"> <div class="Properties"> <a> <xsl:attribute name="href">./<xsl:value-of select="@id"/>_<xsl:value-of select="@name"/>-err.txt</xsl:attribute> System.err » </a> </div> </xsl:if> </body> </html> </xsl:template> <!-- Write properties into a JavaScript data structure. This is based on the original idea by Erik Hatcher (eha...@ap...) --> <xsl:template match="properties"> cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array(); <xsl:for-each select="property"> <xsl:sort select="@name"/> cur['<xsl:value-of select="@name"/>'] = '<xsl:call-template name="JS-escape"><xsl:with-param name="string" select="@value"/></xsl:call-template>'; </xsl:for-each> </xsl:template> <!-- ====================================================================== This page is created for every package. It prints the name of all classes that belongs to this package. @param name the package name to print classes. ====================================================================== --> <!-- list of classes in a package --> <xsl:template name="classes.list"> <xsl:param name="name"/> <html> <head> <title>Unit Test Classes: <xsl:value-of select="$name"/></title> <xsl:call-template name="create.stylesheet.link"> <xsl:with-param name="package.name" select="$name"/> </xsl:call-template> </head> <body> <table width="100%"> <tr> <td nowrap="nowrap"> <h2><a href="package-summary.html" target="classFrame"> <xsl:value-of select="$name"/> <xsl:if test="$name = ''"><none></xsl:if> </a></h2> </td> </tr> </table> <h2>Classes</h2> <table width="100%"> <xsl:for-each select="/testsuites/testsuite[./@package = $name]"> <xsl:sort select="@name"/> <tr> <td nowrap="nowrap"> <a href="{@id}_{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a> </td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> <!-- Creates an all-classes.html file that contains a link to all package-summary.html on each class. --> <xsl:template match="testsuites" mode="all.classes"> <html> <head> <title>All Unit Test Classes</title> <xsl:call-template name="create.stylesheet.link"> <xsl:with-param name="package.name"/> </xsl:call-template> </head> <body> <h2>Classes</h2> <table width="100%"> <xsl:apply-templates select="testsuite" mode="all.classes"> <xsl:sort select="@name"/> </xsl:apply-templates> </table> </body> </html> </xsl:template> <xsl:template match="testsuite" mode="all.classes"> <xsl:variable name="package.name" select="@package"/> <tr> <td nowrap="nowrap"> <a target="classFrame"> <xsl:attribute name="href"> <xsl:if test="not($package.name='')"> <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text> </xsl:if><xsl:value-of select="@id"/>_<xsl:value-of select="@name"/><xsl:text>.html</xsl:text> </xsl:attribute> <xsl:value-of select="@name"/> </a> </td> </tr> </xsl:template> <!-- Creates an html file that contains a link to all package-summary.html files on each package existing on testsuites. @bug there will be a problem here, I don't know yet how to handle unnamed package :( --> <xsl:template match="testsuites" mode="all.packages"> <html> <head> <title>All Unit Test Packages</title> <xsl:call-template name="create.stylesheet.link"> <xsl:with-param name="package.name"/> </xsl:call-template> </head> <body> <h2><a href="overview-summary.html" target="classFrame">Home</a></h2> <h2>Packages</h2> <table width="100%"> <xsl:apply-templates select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]" mode="all.packages"> <xsl:sort select="@package"/> </xsl:apply-templates> </table> </body> </html> </xsl:template> <xsl:template match="testsuite" mode="all.packages"> <tr> <td nowrap="nowrap"> <a href="./{translate(@package,'.','/')}/package-summary.html" target="classFrame"> <xsl:value-of select="@package"/> <xsl:if test="@package = ''"><none></xsl:if> </a> </td> </tr> </xsl:template> <xsl:template match="testsuites" mode="overview.packages"> <html> <head> <title>Unit Test Results: Summary</title> <xsl:call-template name="create.stylesheet.link"> <xsl:with-param name="package.name"/> </xsl:call-template> </head> <body> <xsl:attribute name="onload">open('allclasses-frame.html','classListFrame')</xsl:attribute> <xsl:call-template name="pageHeader"/> <h2>Summary</h2> <xsl:variable name="testCount" select="sum(testsuite/@tests)"/> <xsl:variable name="errorCount" select="sum(testsuite/@errors)"/> <xsl:variable name="failureCount" select="sum(testsuite/@failures)"/> <xsl:variable name="timeCount" select="sum(testsuite/@time)"/> <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/> <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> <tr valign="top"> <th>Tests</th> <th>Failures</th> <th>Errors</th> <th>Success rate</th> <th>Time</th> </tr> <tr valign="top"> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="$errorCount > 0">Error</xsl:when> <xsl:when test="$failureCount > 0">Failure</xsl:when> <xsl:otherwise>Pass</xsl:otherwise> </xsl:choose> </xsl:attribute> <td><a title="Display all tests" href="all-tests.html"><xsl:value-of select="$testCount"/></a></td> <td><a title="Display all failures" href="alltests-fails.html"><xsl:value-of select="$failureCount"/></a></td> <td><a title="Display all errors" href="alltests-errors.html"><xsl:value-of select="$errorCount"/></a></td> <td> <xsl:call-template name="display-percent"> <xsl:with-param name="value" select="$successRate"/> </xsl:call-template> </td> <td> <xsl:call-template name="display-time"> <xsl:with-param name="value" select="$timeCount"/> </xsl:call-template> </td> </tr> </table> <table border="0" width="95%"> <tr> <td style="text-align: justify;"> Note: <em>failures</em> are anticipated and checked for with assertions while <em>errors</em> are unanticipated. </td> </tr> </table> <h2>Packages</h2> <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> <xsl:call-template name="testsuite.test.header"/> <xsl:for-each select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> <xsl:sort select="@package" order="ascending"/> <!-- get the node set containing all testsuites that have the same package --> <xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = current()/@package]"/> <tr valign="top"> <!-- display a failure if there is any failure/error in the package --> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="sum($insamepackage/@errors) > 0">Error</xsl:when> <xsl:when test="sum($insamepackage/@failures) > 0">Failure</xsl:when> <xsl:otherwise>Pass</xsl:otherwise> </xsl:choose> </xsl:attribute> <td><a href="./{translate(@package,'.','/')}/package-summary.html"> <xsl:value-of select="@package"/> <xsl:if test="@package = ''"><none></xsl:if> </a></td> <td><xsl:value-of select="sum($insamepackage/@tests)"/></td> <td><xsl:value-of select="sum($insamepackage/@errors)"/></td> <td><xsl:value-of select="sum($insamepackage/@failures)"/></td> <td> <xsl:call-template name="display-time"> <xsl:with-param name="value" select="sum($insamepackage/@time)"/> </xsl:call-template> </td> <td><xsl:value-of select="$insamepackage/@timestamp"/></td> <td><xsl:value-of select="$insamepackage/@hostname"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> <xsl:template name="package.summary"> <xsl:param name="name"/> <html> <head> <xsl:call-template name="create.stylesheet.link"> <xsl:with-param name="package.name" select="$name"/> </xsl:call-template> </head> <body> <xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute> <xsl:call-template name="pageHeader"/> <h3>Package <xsl:value-of select="$name"/></h3> <!--table border="0" cellpadding="5" cellspacing="2" width="95%"> <xsl:call-template name="class.metrics.header"/> <xsl:apply-templates select="." mode="print.metrics"/> </table--> <xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = $name]"/> <xsl:if test="count($insamepackage) > 0"> <h2>Classes</h2> <p> <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> <xsl:call-template name="testsuite.test.header"/> <xsl:apply-templates select="$insamepackage" mode="print.test"> <xsl:sort select="@name"/> </xsl:apply-templates> </table> </p> </xsl:if> </body> </html> </xsl:template> <!-- transform string like a.b.c to ../../../ @param path the path to transform into a descending directory path --> <xsl:template name="path"> <xsl:param name="path"/> <xsl:if test="contains($path,'.')"> <xsl:text>../</xsl:text> <xsl:call-template name="path"> <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param> </xsl:call-template> </xsl:if> <xsl:if test="not(contains($path,'.')) and not($path = '')"> <xsl:text>../</xsl:text> </xsl:if> </xsl:template> <!-- create the link to the stylesheet based on the package name --> <xsl:template name="create.stylesheet.link"> <xsl:param name="package.name"/> <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> </xsl:template> <!-- Page HEADER --> <xsl:template name="pageHeader"> <h1>Unit Test Results</h1> <table width="100%"> <tr> <td align="left"></td> <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> </tr> </table> <hr size="1"/> </xsl:template> <!-- class header --> <xsl:template name="testsuite.test.header"> <tr valign="top"> <th width="80%">Name</th> <th>Tests</th> <th>Errors</th> <th>Failures</th> <th nowrap="nowrap">Time(s)</th> <th nowrap="nowrap">Time Stamp</th> <th>Host</th> </tr> </xsl:template> <!-- method header --> <xsl:template name="testcase.test.header"> <xsl:param name="show.class" select="''"/> <tr valign="top"> <xsl:if test="boolean($show.class)"> <th>Class</th> </xsl:if> <th>Name</th> <th>Status</th> <th width="80%">Type</th> <th nowrap="nowrap">Time(s)</th> </tr> </xsl:template> <!-- class information --> <xsl:template match="testsuite" mode="print.test"> <tr valign="top"> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="@errors[.> 0]">Error</xsl:when> <xsl:when test="@failures[.> 0]">Failure</xsl:when> <xsl:otherwise>Pass</xsl:otherwise> </xsl:choose> </xsl:attribute> <td><a title="Display all tests" href="{@id}_{@name}.html"><xsl:value-of select="@name"/></a></td> <td><a title="Display all tests" href="{@id}_{@name}.html"><xsl:apply-templates select="@tests"/></a></td> <td> <xsl:choose> <xsl:when test="@errors != 0"> <a title="Display only errors" href="{@id}_{@name}-errors.html"><xsl:apply-templates select="@errors"/></a> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="@errors"/> </xsl:otherwise> </xsl:choose> </td> <td> <xsl:choose> <xsl:when test="@failures != 0"> <a title="Display only failures" href="{@id}_{@name}-fails.html"><xsl:apply-templates select="@failures"/></a> </xsl:when> <xsl:otherwise> <x... [truncated message content] |