git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273302 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -93,13 +93,13 @@ | |||
| td { | |||
| padding-left: 20px; | |||
| } | |||
| .dateAndAuthor { | |||
| .dateAndAuthor { | |||
| font-family: Verdana, Arial, Helvetica, sans-serif; | |||
| font-weight: bold; | |||
| text-align: left; | |||
| background: #a6caf0; | |||
| padding-left: 3px; | |||
| } | |||
| } | |||
| a { | |||
| color: #000000; | |||
| } | |||
| @@ -1,8 +1,8 @@ | |||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | |||
| xmlns:lxslt="http://xml.apache.org/xslt" | |||
| xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect" | |||
| extension-element-prefixes="redirect"> | |||
| <xsl:output method="html" indent="yes"/> | |||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | |||
| xmlns:lxslt="http://xml.apache.org/xslt" | |||
| xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect" | |||
| extension-element-prefixes="redirect"> | |||
| <xsl:output method="html" indent="yes"/> | |||
| <xsl:decimal-format decimal-separator="." grouping-separator="," /> | |||
| <!-- | |||
| The Apache Software License, Version 1.1 | |||
| @@ -77,63 +77,63 @@ | |||
| <xsl:param name="output.dir" select="'.'"/> | |||
| <!-- ====================================================================== | |||
| Root element | |||
| Root element | |||
| ======================================================================= --> | |||
| <xsl:template match="/snapshot"> | |||
| <!-- 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> | |||
| <!-- process all packages --> | |||
| <xsl:apply-templates select="./package" mode="write"/> | |||
| <!-- 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> | |||
| <!-- process all packages --> | |||
| <xsl:apply-templates select="./package" mode="write"/> | |||
| </xsl:template> | |||
| <!-- ======================================================================= | |||
| Frameset definition. Entry point for the report. | |||
| 3 frames: packageListFrame, classListFrame, classFrame | |||
| Frameset definition. Entry point for the report. | |||
| 3 frames: packageListFrame, classListFrame, classFrame | |||
| ======================================================================= --> | |||
| <xsl:template name="index.html"> | |||
| <html> | |||
| <head><title>Coverage 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"/> | |||
| </frameset> | |||
| <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> | |||
| <head><title>Coverage 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"/> | |||
| </frameset> | |||
| <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> | |||
| </html> | |||
| </xsl:template> | |||
| <!-- ======================================================================= | |||
| Stylesheet CSS used | |||
| Stylesheet CSS used | |||
| ======================================================================= --> | |||
| <!-- this is the stylesheet css to use for nearly everything --> | |||
| <xsl:template name="stylesheet.css"> | |||
| @@ -189,115 +189,115 @@ | |||
| </xsl:template> | |||
| <!-- ======================================================================= | |||
| List of all classes in all packages | |||
| This will be the first page in the classListFrame | |||
| List of all classes in all packages | |||
| This will be the first page in the classListFrame | |||
| ======================================================================= --> | |||
| <xsl:template match="snapshot" mode="all.classes"> | |||
| <html> | |||
| <head> | |||
| <xsl:call-template name="create.stylesheet.link"/> | |||
| </head> | |||
| <body> | |||
| <h2>Classes</h2> | |||
| <table width="100%"> | |||
| <xsl:for-each select="package/class"> | |||
| <xsl:sort select="@name"/> | |||
| <xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/> | |||
| <xsl:variable name="link"> | |||
| <xsl:if test="not($package.name='')"> | |||
| <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text> | |||
| </xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text> | |||
| </xsl:variable> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a target="classFrame" href="{$link}"><xsl:value-of select="@name"/></a> | |||
| </td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| <html> | |||
| <head> | |||
| <xsl:call-template name="create.stylesheet.link"/> | |||
| </head> | |||
| <body> | |||
| <h2>Classes</h2> | |||
| <table width="100%"> | |||
| <xsl:for-each select="package/class"> | |||
| <xsl:sort select="@name"/> | |||
| <xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/> | |||
| <xsl:variable name="link"> | |||
| <xsl:if test="not($package.name='')"> | |||
| <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text> | |||
| </xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text> | |||
| </xsl:variable> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a target="classFrame" href="{$link}"><xsl:value-of select="@name"/></a> | |||
| </td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| </xsl:template> | |||
| <!-- list of all packages --> | |||
| <xsl:template match="snapshot" mode="all.packages"> | |||
| <html> | |||
| <head> | |||
| <xsl:call-template name="create.stylesheet.link"/> | |||
| </head> | |||
| <body> | |||
| <h2><a href="overview-summary.html" target="classFrame">Home</a></h2> | |||
| <h2>Packages</h2> | |||
| <table width="100%"> | |||
| <xsl:for-each select="package"> | |||
| <xsl:sort select="@name" order="ascending"/> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a href="{translate(@name,'.','/')}/package-summary.html" target="classFrame"> | |||
| <xsl:value-of select="@name"/> | |||
| </a> | |||
| </td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| <html> | |||
| <head> | |||
| <xsl:call-template name="create.stylesheet.link"/> | |||
| </head> | |||
| <body> | |||
| <h2><a href="overview-summary.html" target="classFrame">Home</a></h2> | |||
| <h2>Packages</h2> | |||
| <table width="100%"> | |||
| <xsl:for-each select="package"> | |||
| <xsl:sort select="@name" order="ascending"/> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a href="{translate(@name,'.','/')}/package-summary.html" target="classFrame"> | |||
| <xsl:value-of select="@name"/> | |||
| </a> | |||
| </td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| </xsl:template> | |||
| <!-- overview of statistics in packages --> | |||
| <xsl:template match="snapshot" mode="overview.packages"> | |||
| <html> | |||
| <head> | |||
| <xsl:call-template name="create.stylesheet.link"/> | |||
| </head> | |||
| <body onload="open('allclasses-frame.html','classListFrame')"> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <h3>Summary</h3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <tr> | |||
| <!--th width="10%" nowrap="nowrap">Date</th> | |||
| <th width="10%" nowrap="nowrap">Elapsed time</th--> | |||
| <th width="10%" nowrap="nowrap">Reported Classes</th> | |||
| <th width="10%" nowrap="nowrap">Methods Hit</th> | |||
| <th width="10%" nowrap="nowrap">Lines Hit</th> | |||
| </tr> | |||
| <tr class="a"> | |||
| <!--td nowrap="nowrap"><xsl:value-of select="execution_log/@program_start"/></td> | |||
| <td><xsl:value-of select="format-number(execution_log/@elapsed_time div 1000,'0.0')"/>secs</td--> | |||
| <td><xsl:value-of select="count(package/class)"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%"> | |||
| <tr> | |||
| <td style="text-align: justify;"> | |||
| To ensure accurate test runs on Java applications, developers need to know how much of | |||
| the code has been tested, and where to find any untested code. Coverage helps you | |||
| locate untested code, and measure precisely how much code has been exercised. | |||
| The result is a higher quality application in a shorter period of time. | |||
| <p/> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <h3>Packages</h3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="package[1]" mode="stats.header"/> | |||
| <!-- display packages and sort them via their coverage rate --> | |||
| <xsl:for-each select="package"> | |||
| <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/> | |||
| <tr> | |||
| <xsl:call-template name="alternate-row"/> | |||
| <td><a href="{translate(@name,'.','/')}/package-summary.html"><xsl:value-of select="@name"/></a></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </body> | |||
| </html> | |||
| <html> | |||
| <head> | |||
| <xsl:call-template name="create.stylesheet.link"/> | |||
| </head> | |||
| <body onload="open('allclasses-frame.html','classListFrame')"> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <h3>Summary</h3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <tr> | |||
| <!--th width="10%" nowrap="nowrap">Date</th> | |||
| <th width="10%" nowrap="nowrap">Elapsed time</th--> | |||
| <th width="10%" nowrap="nowrap">Reported Classes</th> | |||
| <th width="10%" nowrap="nowrap">Methods Hit</th> | |||
| <th width="10%" nowrap="nowrap">Lines Hit</th> | |||
| </tr> | |||
| <tr class="a"> | |||
| <!--td nowrap="nowrap"><xsl:value-of select="execution_log/@program_start"/></td> | |||
| <td><xsl:value-of select="format-number(execution_log/@elapsed_time div 1000,'0.0')"/>secs</td--> | |||
| <td><xsl:value-of select="count(package/class)"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%"> | |||
| <tr> | |||
| <td style="text-align: justify;"> | |||
| To ensure accurate test runs on Java applications, developers need to know how much of | |||
| the code has been tested, and where to find any untested code. Coverage helps you | |||
| locate untested code, and measure precisely how much code has been exercised. | |||
| The result is a higher quality application in a shorter period of time. | |||
| <p/> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <h3>Packages</h3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="package[1]" mode="stats.header"/> | |||
| <!-- display packages and sort them via their coverage rate --> | |||
| <xsl:for-each select="package"> | |||
| <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/> | |||
| <tr> | |||
| <xsl:call-template name="alternate-row"/> | |||
| <td><a href="{translate(@name,'.','/')}/package-summary.html"><xsl:value-of select="@name"/></a></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </body> | |||
| </html> | |||
| </xsl:template> | |||
| <!-- | |||
| @@ -305,122 +305,122 @@ | |||
| , the summary page, and the info for each class | |||
| --> | |||
| <xsl:template match="package" mode="write"> | |||
| <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> | |||
| <!-- create a classes-list.html in the package directory --> | |||
| <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html"> | |||
| <xsl:apply-templates select="." mode="classes.list"/> | |||
| </redirect:write> | |||
| <!-- create a package-summary.html in the package directory --> | |||
| <redirect:write file="{$output.dir}/{$package.dir}/package-summary.html"> | |||
| <xsl:apply-templates select="." mode="package.summary"/> | |||
| </redirect:write> | |||
| <!-- for each class, creates a @name.html --> | |||
| <xsl:for-each select="class"> | |||
| <redirect:write file="{$output.dir}/{$package.dir}/{@name}.html"> | |||
| <xsl:apply-templates select="." mode="class.details"/> | |||
| </redirect:write> | |||
| </xsl:for-each> | |||
| <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> | |||
| <!-- create a classes-list.html in the package directory --> | |||
| <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html"> | |||
| <xsl:apply-templates select="." mode="classes.list"/> | |||
| </redirect:write> | |||
| <!-- create a package-summary.html in the package directory --> | |||
| <redirect:write file="{$output.dir}/{$package.dir}/package-summary.html"> | |||
| <xsl:apply-templates select="." mode="package.summary"/> | |||
| </redirect:write> | |||
| <!-- for each class, creates a @name.html --> | |||
| <xsl:for-each select="class"> | |||
| <redirect:write file="{$output.dir}/{$package.dir}/{@name}.html"> | |||
| <xsl:apply-templates select="." mode="class.details"/> | |||
| </redirect:write> | |||
| </xsl:for-each> | |||
| </xsl:template> | |||
| <!-- list of classes in a package --> | |||
| <xsl:template match="package" mode="classes.list"> | |||
| <html> | |||
| <HEAD> | |||
| <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"/></a></H2> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <H2>Classes</H2> | |||
| <TABLE WIDTH="100%"> | |||
| <xsl:for-each select="class"> | |||
| <xsl:sort select="@name"/> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a> | |||
| </td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </TABLE> | |||
| </BODY> | |||
| </html> | |||
| <html> | |||
| <HEAD> | |||
| <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"/></a></H2> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <H2>Classes</H2> | |||
| <TABLE WIDTH="100%"> | |||
| <xsl:for-each select="class"> | |||
| <xsl:sort select="@name"/> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a> | |||
| </td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </TABLE> | |||
| </BODY> | |||
| </html> | |||
| </xsl:template> | |||
| <!-- summary of a package --> | |||
| <xsl:template match="package" mode="package.summary"> | |||
| <HTML> | |||
| <HEAD> | |||
| <xsl:call-template name="create.stylesheet.link"> | |||
| <xsl:with-param name="package.name" select="@name"/> | |||
| </xsl:call-template> | |||
| </HEAD> | |||
| <!-- when loading this package, it will open the classes into the frame --> | |||
| <BODY onload="open('package-frame.html','classListFrame')"> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <h3>Package <xsl:value-of select="@name"/></h3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="." mode="stats.header"/> | |||
| <xsl:apply-templates select="." mode="stats"/> | |||
| </table> | |||
| <xsl:if test="count(class) > 0"> | |||
| <H3>Classes</H3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="." mode="stats.header"/> | |||
| <xsl:apply-templates select="class" mode="stats"> | |||
| <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| </xsl:if> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </BODY> | |||
| </HTML> | |||
| <HTML> | |||
| <HEAD> | |||
| <xsl:call-template name="create.stylesheet.link"> | |||
| <xsl:with-param name="package.name" select="@name"/> | |||
| </xsl:call-template> | |||
| </HEAD> | |||
| <!-- when loading this package, it will open the classes into the frame --> | |||
| <BODY onload="open('package-frame.html','classListFrame')"> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <h3>Package <xsl:value-of select="@name"/></h3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="." mode="stats.header"/> | |||
| <xsl:apply-templates select="." mode="stats"/> | |||
| </table> | |||
| <xsl:if test="count(class) > 0"> | |||
| <H3>Classes</H3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="." mode="stats.header"/> | |||
| <xsl:apply-templates select="class" mode="stats"> | |||
| <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| </xsl:if> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </BODY> | |||
| </HTML> | |||
| </xsl:template> | |||
| <!-- details of a class --> | |||
| <xsl:template match="class" mode="class.details"> | |||
| <xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/> | |||
| <HTML> | |||
| <HEAD> | |||
| <xsl:call-template name="create.stylesheet.link"> | |||
| <xsl:with-param name="package.name" select="$package.name"/> | |||
| </xsl:call-template> | |||
| </HEAD> | |||
| <BODY> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3> | |||
| <!-- class summary --> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="." mode="stats.header"/> | |||
| <xsl:apply-templates select="." mode="stats"/> | |||
| </table> | |||
| <!-- details of methods --> | |||
| <H3>Methods</H3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="method[1]" mode="stats.header"/> | |||
| <xsl:apply-templates select="method" mode="stats"> | |||
| <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </BODY> | |||
| </HTML> | |||
| <xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/> | |||
| <HTML> | |||
| <HEAD> | |||
| <xsl:call-template name="create.stylesheet.link"> | |||
| <xsl:with-param name="package.name" select="$package.name"/> | |||
| </xsl:call-template> | |||
| </HEAD> | |||
| <BODY> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3> | |||
| <!-- class summary --> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="." mode="stats.header"/> | |||
| <xsl:apply-templates select="." mode="stats"/> | |||
| </table> | |||
| <!-- details of methods --> | |||
| <H3>Methods</H3> | |||
| <table class="log" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:apply-templates select="method[1]" mode="stats.header"/> | |||
| <xsl:apply-templates select="method" mode="stats"> | |||
| <xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </BODY> | |||
| </HTML> | |||
| </xsl:template> | |||
| @@ -434,13 +434,13 @@ | |||
| <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"><h2>Source Code Coverage</h2></td> | |||
| </tr> | |||
| <tr> | |||
| <td style="text-align:right">Designed for use with <a href='http://www.sitraka.com/jprobe'>Sitraka JProbe</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td> | |||
| </tr> | |||
| <td style="text-align:right"><h2>Source Code Coverage</h2></td> | |||
| </tr> | |||
| <tr> | |||
| <td style="text-align:right">Designed for use with <a href='http://www.sitraka.com/jprobe'>Sitraka JProbe</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td> | |||
| </tr> | |||
| </table> | |||
| <hr size="1"/> | |||
| <hr size="1"/> | |||
| </xsl:template> | |||
| <!-- Page Footer --> | |||
| @@ -457,43 +457,43 @@ | |||
| <xsl:template name="table.header"> | |||
| <tr> | |||
| <th width="80%">Name</th> | |||
| <th width="10%" nowrap="nowrap">Methods Hit</th> | |||
| <th width="10%" nowrap="nowrap">Lines Hit</th> | |||
| </tr> | |||
| <tr> | |||
| <th width="80%">Name</th> | |||
| <th width="10%" nowrap="nowrap">Methods Hit</th> | |||
| <th width="10%" nowrap="nowrap">Lines Hit</th> | |||
| </tr> | |||
| </xsl:template> | |||
| <xsl:template match="method" mode="stats.header"> | |||
| <tr> | |||
| <th width="90%">Name</th> | |||
| <th width="10%" nowrap="nowrap">Lines Hit</th> | |||
| </tr> | |||
| <tr> | |||
| <th width="90%">Name</th> | |||
| <th width="10%" nowrap="nowrap">Lines Hit</th> | |||
| </tr> | |||
| </xsl:template> | |||
| <xsl:template match="method" mode="stats"> | |||
| <tr> | |||
| <xsl:call-template name="alternate-row"/> | |||
| <td><xsl:value-of select="@name"/></td> | |||
| <td> | |||
| <xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <xsl:call-template name="alternate-row"/> | |||
| <td><xsl:value-of select="@name"/></td> | |||
| <td> | |||
| <xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/> | |||
| </td> | |||
| </tr> | |||
| </xsl:template> | |||
| <xsl:template match="package|class" mode="stats.header"> | |||
| <tr> | |||
| <th width="80%">Name</th> | |||
| <th width="10%" nowrap="nowrap">Methods Hit</th> | |||
| <th width="10%" nowrap="nowrap">Lines Hit</th> | |||
| </tr> | |||
| <tr> | |||
| <th width="80%">Name</th> | |||
| <th width="10%" nowrap="nowrap">Methods Hit</th> | |||
| <th width="10%" nowrap="nowrap">Lines Hit</th> | |||
| </tr> | |||
| </xsl:template> | |||
| <xsl:template match="package|class" mode="stats"> | |||
| <tr> | |||
| <xsl:call-template name="alternate-row"/> | |||
| <td><xsl:value-of select="@name"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td> | |||
| </tr> | |||
| <tr> | |||
| <xsl:call-template name="alternate-row"/> | |||
| <td><xsl:value-of select="@name"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td> | |||
| <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td> | |||
| </tr> | |||
| </xsl:template> | |||
| <!-- | |||
| @@ -501,23 +501,23 @@ | |||
| @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: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: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> | |||
| <!-- alternated row style --> | |||
| @@ -1,4 +1,4 @@ | |||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |||
| <!-- | |||
| The Apache Software License, Version 1.1 | |||
| @@ -57,256 +57,256 @@ | |||
| <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> | |||
| <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> | |||
| </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> | |||
| @@ -1,4 +1,4 @@ | |||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |||
| <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | |||
| <xsl:decimal-format decimal-separator="." grouping-separator="," /> | |||
| <!-- | |||
| @@ -67,55 +67,55 @@ | |||
| --> | |||
| <xsl:template match="testsuites"> | |||
| <HTML> | |||
| <HEAD> | |||
| <HTML> | |||
| <HEAD> | |||
| <style type="text/css"> | |||
| body { | |||
| font:normal 68% verdana,arial,helvetica; | |||
| color:#000000; | |||
| 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; | |||
| font-weight: bold; | |||
| text-align:left; | |||
| background:#a6caf0; | |||
| } | |||
| table.details tr td{ | |||
| background:#eeeee0; | |||
| background:#eeeee0; | |||
| } | |||
| p { | |||
| line-height:1.5em; | |||
| margin-top:0.5em; margin-bottom:1.0em; | |||
| line-height:1.5em; | |||
| margin-top:0.5em; margin-bottom:1.0em; | |||
| } | |||
| h1 { | |||
| margin: 0px 0px 5px; font: 165% verdana,arial,helvetica | |||
| margin: 0px 0px 5px; font: 165% verdana,arial,helvetica | |||
| } | |||
| h2 { | |||
| margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica | |||
| margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica | |||
| } | |||
| h3 { | |||
| margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica | |||
| margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica | |||
| } | |||
| h4 { | |||
| margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica | |||
| margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica | |||
| } | |||
| h5 { | |||
| margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica | |||
| margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica | |||
| } | |||
| h6 { | |||
| margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica | |||
| margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica | |||
| } | |||
| .Error { | |||
| font-weight:bold; color:red; | |||
| font-weight:bold; color:red; | |||
| } | |||
| .Failure { | |||
| font-weight:bold; color:purple; | |||
| font-weight:bold; color:purple; | |||
| } | |||
| .Properties { | |||
| text-align:right; | |||
| text-align:right; | |||
| } | |||
| </style> | |||
| <script language="JavaScript"> | |||
| @@ -132,7 +132,7 @@ | |||
| var doc = win.document.open(); | |||
| doc.write("<html><head><title>Properties of " + name + "</title>"); | |||
| doc.write("<style>") | |||
| doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000; }"); | |||
| 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; }"); | |||
| @@ -154,363 +154,363 @@ | |||
| } | |||
| ]]> | |||
| </script> | |||
| </HEAD> | |||
| <body> | |||
| <a name="top"></a> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <!-- Summary part --> | |||
| <xsl:call-template name="summary"/> | |||
| <hr size="1" width="95%" align="left"/> | |||
| <!-- Package List part --> | |||
| <xsl:call-template name="packagelist"/> | |||
| <hr size="1" width="95%" align="left"/> | |||
| <!-- For each package create its part --> | |||
| <xsl:call-template name="packages"/> | |||
| <hr size="1" width="95%" align="left"/> | |||
| <!-- For each class create the part --> | |||
| <xsl:call-template name="classes"/> | |||
| </body> | |||
| </HTML> | |||
| </HEAD> | |||
| <body> | |||
| <a name="top"></a> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <!-- Summary part --> | |||
| <xsl:call-template name="summary"/> | |||
| <hr size="1" width="95%" align="left"/> | |||
| <!-- Package List part --> | |||
| <xsl:call-template name="packagelist"/> | |||
| <hr size="1" width="95%" align="left"/> | |||
| <!-- For each package create its part --> | |||
| <xsl:call-template name="packages"/> | |||
| <hr size="1" width="95%" align="left"/> | |||
| <!-- For each class create the part --> | |||
| <xsl:call-template name="classes"/> | |||
| </body> | |||
| </HTML> | |||
| </xsl:template> | |||
| <!-- ================================================================== --> | |||
| <!-- Write a list of all packages with an hyperlink to the anchor of --> | |||
| <!-- of the package name. --> | |||
| <!-- ================================================================== --> | |||
| <xsl:template name="packagelist"> | |||
| <h2>Packages</h2> | |||
| Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers. | |||
| <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> | |||
| <xsl:call-template name="testsuite.test.header"/> | |||
| <!-- list all packages recursively --> | |||
| <xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> | |||
| <xsl:sort select="@package"/> | |||
| <xsl:variable name="testsuites-in-package" select="/testsuites/testsuite[./@package = current()/@package]"/> | |||
| <xsl:variable name="testCount" select="sum($testsuites-in-package/@tests)"/> | |||
| <xsl:variable name="errorCount" select="sum($testsuites-in-package/@errors)"/> | |||
| <xsl:variable name="failureCount" select="sum($testsuites-in-package/@failures)"/> | |||
| <xsl:variable name="timeCount" select="sum($testsuites-in-package/@time)"/> | |||
| <!-- write a summary for the package --> | |||
| <tr valign="top"> | |||
| <!-- set a nice color depending if there is an error/failure --> | |||
| <xsl:attribute name="class"> | |||
| <xsl:choose> | |||
| <xsl:when test="$failureCount > 0">Failure</xsl:when> | |||
| <xsl:when test="$errorCount > 0">Error</xsl:when> | |||
| </xsl:choose> | |||
| </xsl:attribute> | |||
| <td><a href="#{@package}"><xsl:value-of select="@package"/></a></td> | |||
| <td><xsl:value-of select="$testCount"/></td> | |||
| <td><xsl:value-of select="$errorCount"/></td> | |||
| <td><xsl:value-of select="$failureCount"/></td> | |||
| <td> | |||
| <xsl:call-template name="display-time"> | |||
| <xsl:with-param name="value" select="$timeCount"/> | |||
| </xsl:call-template> | |||
| </td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| </xsl:template> | |||
| <!-- ================================================================== --> | |||
| <!-- Write a package level report --> | |||
| <!-- It creates a table with values from the document: --> | |||
| <!-- Name | Tests | Errors | Failures | Time --> | |||
| <!-- ================================================================== --> | |||
| <xsl:template name="packages"> | |||
| <!-- create an anchor to this package name --> | |||
| <xsl:for-each select="/testsuites/testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> | |||
| <xsl:sort select="@package"/> | |||
| <a name="{@package}"></a> | |||
| <h3>Package <xsl:value-of select="@package"/></h3> | |||
| <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> | |||
| <xsl:call-template name="testsuite.test.header"/> | |||
| <!-- match the testsuites of this package --> | |||
| <xsl:apply-templates select="/testsuites/testsuite[./@package = current()/@package]" mode="print.test"/> | |||
| </table> | |||
| <a href="#top">Back to top</a> | |||
| <p/> | |||
| <p/> | |||
| </xsl:for-each> | |||
| </xsl:template> | |||
| <xsl:template name="classes"> | |||
| <xsl:for-each select="testsuite"> | |||
| <xsl:sort select="@name"/> | |||
| <!-- create an anchor to this class name --> | |||
| <a name="{@name}"></a> | |||
| <h3>TestCase <xsl:value-of select="@name"/></h3> | |||
| <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:apply-templates select="./testcase" mode="print.test"/> | |||
| </table> | |||
| <!-- ================================================================== --> | |||
| <!-- Write a list of all packages with an hyperlink to the anchor of --> | |||
| <!-- of the package name. --> | |||
| <!-- ================================================================== --> | |||
| <xsl:template name="packagelist"> | |||
| <h2>Packages</h2> | |||
| Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers. | |||
| <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> | |||
| <xsl:call-template name="testsuite.test.header"/> | |||
| <!-- list all packages recursively --> | |||
| <xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> | |||
| <xsl:sort select="@package"/> | |||
| <xsl:variable name="testsuites-in-package" select="/testsuites/testsuite[./@package = current()/@package]"/> | |||
| <xsl:variable name="testCount" select="sum($testsuites-in-package/@tests)"/> | |||
| <xsl:variable name="errorCount" select="sum($testsuites-in-package/@errors)"/> | |||
| <xsl:variable name="failureCount" select="sum($testsuites-in-package/@failures)"/> | |||
| <xsl:variable name="timeCount" select="sum($testsuites-in-package/@time)"/> | |||
| <!-- write a summary for the package --> | |||
| <tr valign="top"> | |||
| <!-- set a nice color depending if there is an error/failure --> | |||
| <xsl:attribute name="class"> | |||
| <xsl:choose> | |||
| <xsl:when test="$failureCount > 0">Failure</xsl:when> | |||
| <xsl:when test="$errorCount > 0">Error</xsl:when> | |||
| </xsl:choose> | |||
| </xsl:attribute> | |||
| <td><a href="#{@package}"><xsl:value-of select="@package"/></a></td> | |||
| <td><xsl:value-of select="$testCount"/></td> | |||
| <td><xsl:value-of select="$errorCount"/></td> | |||
| <td><xsl:value-of select="$failureCount"/></td> | |||
| <td> | |||
| <xsl:call-template name="display-time"> | |||
| <xsl:with-param name="value" select="$timeCount"/> | |||
| </xsl:call-template> | |||
| </td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| </xsl:template> | |||
| <!-- ================================================================== --> | |||
| <!-- Write a package level report --> | |||
| <!-- It creates a table with values from the document: --> | |||
| <!-- Name | Tests | Errors | Failures | Time --> | |||
| <!-- ================================================================== --> | |||
| <xsl:template name="packages"> | |||
| <!-- create an anchor to this package name --> | |||
| <xsl:for-each select="/testsuites/testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> | |||
| <xsl:sort select="@package"/> | |||
| <a name="{@package}"></a> | |||
| <h3>Package <xsl:value-of select="@package"/></h3> | |||
| <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> | |||
| <xsl:call-template name="testsuite.test.header"/> | |||
| <!-- match the testsuites of this package --> | |||
| <xsl:apply-templates select="/testsuites/testsuite[./@package = current()/@package]" mode="print.test"/> | |||
| </table> | |||
| <a href="#top">Back to top</a> | |||
| <p/> | |||
| <p/> | |||
| </xsl:for-each> | |||
| </xsl:template> | |||
| <xsl:template name="classes"> | |||
| <xsl:for-each select="testsuite"> | |||
| <xsl:sort select="@name"/> | |||
| <!-- create an anchor to this class name --> | |||
| <a name="{@name}"></a> | |||
| <h3>TestCase <xsl:value-of select="@name"/></h3> | |||
| <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:apply-templates select="./testcase" mode="print.test"/> | |||
| </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> | |||
| <xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute> | |||
| Properties » | |||
| </a> | |||
| </div> | |||
| <p/> | |||
| <a href="#top">Back to top</a> | |||
| </xsl:for-each> | |||
| </xsl:template> | |||
| <xsl:template name="summary"> | |||
| <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="$failureCount > 0">Failure</xsl:when> | |||
| <xsl:when test="$errorCount > 0">Error</xsl:when> | |||
| </xsl:choose> | |||
| </xsl:attribute> | |||
| <td><xsl:value-of select="$testCount"/></td> | |||
| <td><xsl:value-of select="$failureCount"/></td> | |||
| <td><xsl:value-of select="$errorCount"/></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> | |||
| <p/> | |||
| <a href="#top">Back to top</a> | |||
| </xsl:for-each> | |||
| </xsl:template> | |||
| <xsl:template name="summary"> | |||
| <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="$failureCount > 0">Failure</xsl:when> | |||
| <xsl:when test="$errorCount > 0">Error</xsl:when> | |||
| </xsl:choose> | |||
| </xsl:attribute> | |||
| <td><xsl:value-of select="$testCount"/></td> | |||
| <td><xsl:value-of select="$failureCount"/></td> | |||
| <td><xsl:value-of select="$errorCount"/></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: <i>failures</i> are anticipated and checked for with assertions while <i>errors</i> are unanticipated. | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| </xsl:template> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="95%"> | |||
| <tr> | |||
| <td style="text-align: justify;"> | |||
| Note: <i>failures</i> are anticipated and checked for with assertions while <i>errors</i> are unanticipated. | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| </xsl:template> | |||
| <!-- | |||
| Write properties into a JavaScript data structure. | |||
| This is based on the original idea by Erik Hatcher (ehatcher@apache.org) | |||
| --> | |||
| <xsl:template match="properties"> | |||
| cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array(); | |||
| <xsl:for-each select="property"> | |||
| <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:for-each> | |||
| </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://jakarta.apache.org/ant'>Ant</a>.</td> | |||
| </tr> | |||
| </table> | |||
| <hr size="1"/> | |||
| <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://jakarta.apache.org/ant'>Ant</a>.</td> | |||
| </tr> | |||
| </table> | |||
| <hr size="1"/> | |||
| </xsl:template> | |||
| <xsl:template match="testsuite" mode="header"> | |||
| <tr valign="top"> | |||
| <th width="80%">Name</th> | |||
| <th>Tests</th> | |||
| <th>Errors</th> | |||
| <th>Failures</th> | |||
| <th nowrap="nowrap">Time(s)</th> | |||
| </tr> | |||
| <tr valign="top"> | |||
| <th width="80%">Name</th> | |||
| <th>Tests</th> | |||
| <th>Errors</th> | |||
| <th>Failures</th> | |||
| <th nowrap="nowrap">Time(s)</th> | |||
| </tr> | |||
| </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> | |||
| </tr> | |||
| <tr valign="top"> | |||
| <th width="80%">Name</th> | |||
| <th>Tests</th> | |||
| <th>Errors</th> | |||
| <th>Failures</th> | |||
| <th nowrap="nowrap">Time(s)</th> | |||
| </tr> | |||
| </xsl:template> | |||
| <!-- method header --> | |||
| <xsl:template name="testcase.test.header"> | |||
| <tr valign="top"> | |||
| <th>Name</th> | |||
| <th>Status</th> | |||
| <th width="80%">Type</th> | |||
| <th nowrap="nowrap">Time(s)</th> | |||
| </tr> | |||
| <tr valign="top"> | |||
| <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"> | |||
| <!-- set a nice color depending if there is an error/failure --> | |||
| <xsl:attribute name="class"> | |||
| <xsl:choose> | |||
| <xsl:when test="@failures[.> 0]">Failure</xsl:when> | |||
| <xsl:when test="@errors[.> 0]">Error</xsl:when> | |||
| </xsl:choose> | |||
| </xsl:attribute> | |||
| <!-- print testsuite information --> | |||
| <td><a href="#{@name}"><xsl:value-of select="@name"/></a></td> | |||
| <td><xsl:value-of select="@tests"/></td> | |||
| <td><xsl:value-of select="@errors"/></td> | |||
| <td><xsl:value-of select="@failures"/></td> | |||
| <td> | |||
| <xsl:call-template name="display-time"> | |||
| <xsl:with-param name="value" select="@time"/> | |||
| </xsl:call-template> | |||
| </td> | |||
| </tr> | |||
| <tr valign="top"> | |||
| <!-- set a nice color depending if there is an error/failure --> | |||
| <xsl:attribute name="class"> | |||
| <xsl:choose> | |||
| <xsl:when test="@failures[.> 0]">Failure</xsl:when> | |||
| <xsl:when test="@errors[.> 0]">Error</xsl:when> | |||
| </xsl:choose> | |||
| </xsl:attribute> | |||
| <!-- print testsuite information --> | |||
| <td><a href="#{@name}"><xsl:value-of select="@name"/></a></td> | |||
| <td><xsl:value-of select="@tests"/></td> | |||
| <td><xsl:value-of select="@errors"/></td> | |||
| <td><xsl:value-of select="@failures"/></td> | |||
| <td> | |||
| <xsl:call-template name="display-time"> | |||
| <xsl:with-param name="value" select="@time"/> | |||
| </xsl:call-template> | |||
| </td> | |||
| </tr> | |||
| </xsl:template> | |||
| <xsl:template match="testcase" mode="print.test"> | |||
| <tr valign="top"> | |||
| <xsl:attribute name="class"> | |||
| <xsl:choose> | |||
| <xsl:when test="failure | error">Error</xsl:when> | |||
| </xsl:choose> | |||
| </xsl:attribute> | |||
| <td><xsl:value-of select="@name"/></td> | |||
| <xsl:choose> | |||
| <xsl:when test="failure"> | |||
| <td>Failure</td> | |||
| <td><xsl:apply-templates select="failure"/></td> | |||
| </xsl:when> | |||
| <xsl:when test="error"> | |||
| <td>Error</td> | |||
| <td><xsl:apply-templates select="error"/></td> | |||
| </xsl:when> | |||
| <xsl:otherwise> | |||
| <td>Success</td> | |||
| <td></td> | |||
| </xsl:otherwise> | |||
| </xsl:choose> | |||
| <td> | |||
| <xsl:call-template name="display-time"> | |||
| <xsl:with-param name="value" select="@time"/> | |||
| </xsl:call-template> | |||
| </td> | |||
| </tr> | |||
| <tr valign="top"> | |||
| <xsl:attribute name="class"> | |||
| <xsl:choose> | |||
| <xsl:when test="failure | error">Error</xsl:when> | |||
| </xsl:choose> | |||
| </xsl:attribute> | |||
| <td><xsl:value-of select="@name"/></td> | |||
| <xsl:choose> | |||
| <xsl:when test="failure"> | |||
| <td>Failure</td> | |||
| <td><xsl:apply-templates select="failure"/></td> | |||
| </xsl:when> | |||
| <xsl:when test="error"> | |||
| <td>Error</td> | |||
| <td><xsl:apply-templates select="error"/></td> | |||
| </xsl:when> | |||
| <xsl:otherwise> | |||
| <td>Success</td> | |||
| <td></td> | |||
| </xsl:otherwise> | |||
| </xsl:choose> | |||
| <td> | |||
| <xsl:call-template name="display-time"> | |||
| <xsl:with-param name="value" select="@time"/> | |||
| </xsl:call-template> | |||
| </td> | |||
| </tr> | |||
| </xsl:template> | |||
| <xsl:template match="failure"> | |||
| <xsl:call-template name="display-failures"/> | |||
| <xsl:call-template name="display-failures"/> | |||
| </xsl:template> | |||
| <xsl:template match="error"> | |||
| <xsl:call-template name="display-failures"/> | |||
| <xsl:call-template name="display-failures"/> | |||
| </xsl:template> | |||
| <!-- Style for the error and failure in the tescase template --> | |||
| <xsl:template name="display-failures"> | |||
| <xsl:choose> | |||
| <xsl:when test="not(@message)">N/A</xsl:when> | |||
| <xsl:otherwise> | |||
| <xsl:value-of select="@message"/> | |||
| </xsl:otherwise> | |||
| </xsl:choose> | |||
| <!-- display the stacktrace --> | |||
| <code> | |||
| <p/> | |||
| <xsl:call-template name="br-replace"> | |||
| <xsl:with-param name="word" select="."/> | |||
| </xsl:call-template> | |||
| </code> | |||
| <!-- the later is better but might be problematic for non-21" monitors... --> | |||
| <!--pre><xsl:value-of select="."/></pre--> | |||
| <xsl:choose> | |||
| <xsl:when test="not(@message)">N/A</xsl:when> | |||
| <xsl:otherwise> | |||
| <xsl:value-of select="@message"/> | |||
| </xsl:otherwise> | |||
| </xsl:choose> | |||
| <!-- display the stacktrace --> | |||
| <code> | |||
| <p/> | |||
| <xsl:call-template name="br-replace"> | |||
| <xsl:with-param name="word" select="."/> | |||
| </xsl:call-template> | |||
| </code> | |||
| <!-- the later is better but might be problematic for non-21" monitors... --> | |||
| <!--pre><xsl:value-of select="."/></pre--> | |||
| </xsl:template> | |||
| <xsl:template name="JS-escape"> | |||
| <xsl:param name="string"/> | |||
| <xsl:choose> | |||
| <xsl:when test="contains($string,"'")"> | |||
| <xsl:value-of select="substring-before($string,"'")"/>\'<xsl:call-template name="JS-escape"> | |||
| <xsl:with-param name="string" select="substring-after($string,"'")"/> | |||
| </xsl:call-template> | |||
| </xsl:when> | |||
| <xsl:when test="contains($string,'\')"> | |||
| <xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template name="JS-escape"> | |||
| <xsl:with-param name="string" select="substring-after($string,'\')"/> | |||
| </xsl:call-template> | |||
| </xsl:when> | |||
| <xsl:otherwise> | |||
| <xsl:value-of select="$string"/> | |||
| </xsl:otherwise> | |||
| </xsl:choose> | |||
| <xsl:param name="string"/> | |||
| <xsl:choose> | |||
| <xsl:when test="contains($string,"'")"> | |||
| <xsl:value-of select="substring-before($string,"'")"/>\'<xsl:call-template name="JS-escape"> | |||
| <xsl:with-param name="string" select="substring-after($string,"'")"/> | |||
| </xsl:call-template> | |||
| </xsl:when> | |||
| <xsl:when test="contains($string,'\')"> | |||
| <xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template name="JS-escape"> | |||
| <xsl:with-param name="string" select="substring-after($string,'\')"/> | |||
| </xsl:call-template> | |||
| </xsl:when> | |||
| <xsl:otherwise> | |||
| <xsl:value-of select="$string"/> | |||
| </xsl:otherwise> | |||
| </xsl:choose> | |||
| </xsl:template> | |||
| <!-- | |||
| template that will convert a carriage return into a br tag | |||
| @param word the text from which to convert CR to BR tag | |||
| template that will convert a carriage return into a br tag | |||
| @param word the text from which to convert CR to BR tag | |||
| --> | |||
| <xsl:template name="br-replace"> | |||
| <xsl:param name="word"/> | |||
| <xsl:choose> | |||
| <xsl:when test="contains($word,'
')"> | |||
| <xsl:value-of select="substring-before($word,'
')"/> | |||
| <br/> | |||
| <xsl:call-template name="br-replace"> | |||
| <xsl:with-param name="word" select="substring-after($word,'
')"/> | |||
| </xsl:call-template> | |||
| </xsl:when> | |||
| <xsl:otherwise> | |||
| <xsl:value-of select="$word"/> | |||
| </xsl:otherwise> | |||
| </xsl:choose> | |||
| <xsl:param name="word"/> | |||
| <xsl:choose> | |||
| <xsl:when test="contains($word,'
')"> | |||
| <xsl:value-of select="substring-before($word,'
')"/> | |||
| <br/> | |||
| <xsl:call-template name="br-replace"> | |||
| <xsl:with-param name="word" select="substring-after($word,'
')"/> | |||
| </xsl:call-template> | |||
| </xsl:when> | |||
| <xsl:otherwise> | |||
| <xsl:value-of select="$word"/> | |||
| </xsl:otherwise> | |||
| </xsl:choose> | |||
| </xsl:template> | |||
| <xsl:template name="display-time"> | |||
| <xsl:param name="value"/> | |||
| <xsl:value-of select="format-number($value,'0.000')"/> | |||
| <xsl:param name="value"/> | |||
| <xsl:value-of select="format-number($value,'0.000')"/> | |||
| </xsl:template> | |||
| <xsl:template name="display-percent"> | |||
| <xsl:param name="value"/> | |||
| <xsl:value-of select="format-number($value,'0.00%')"/> | |||
| <xsl:param name="value"/> | |||
| <xsl:value-of select="format-number($value,'0.00%')"/> | |||
| </xsl:template> | |||
| </xsl:stylesheet> | |||
| @@ -1,8 +1,8 @@ | |||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | |||
| xmlns:lxslt="http://xml.apache.org/xslt" | |||
| xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect" | |||
| extension-element-prefixes="redirect"> | |||
| <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | |||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | |||
| xmlns:lxslt="http://xml.apache.org/xslt" | |||
| xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect" | |||
| extension-element-prefixes="redirect"> | |||
| <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | |||
| <xsl:decimal-format decimal-separator="." grouping-separator="," /> | |||
| <!-- | |||
| The Apache Software License, Version 1.1 | |||
| @@ -71,86 +71,86 @@ | |||
| <xsl:template match="classes"> | |||
| <!-- 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> | |||
| <!-- process all packages --> | |||
| <xsl:for-each select="./class[not(./@package = preceding-sibling::class/@package)]"> | |||
| <xsl:call-template name="package"> | |||
| <xsl:with-param name="name" select="@package"/> | |||
| </xsl:call-template> | |||
| </xsl:for-each> | |||
| <!-- 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> | |||
| <!-- process all packages --> | |||
| <xsl:for-each select="./class[not(./@package = preceding-sibling::class/@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="/classes/class[@package = $name]"> | |||
| <redirect:write file="{$output.dir}/{$package.dir}/{@name}.html"> | |||
| <xsl:apply-templates select="." mode="class.details"/> | |||
| </redirect:write> | |||
| </xsl:for-each> | |||
| <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="/classes/class[@package = $name]"> | |||
| <redirect:write file="{$output.dir}/{$package.dir}/{@name}.html"> | |||
| <xsl:apply-templates select="." mode="class.details"/> | |||
| </redirect:write> | |||
| </xsl:for-each> | |||
| </xsl:template> | |||
| <xsl:template name="index.html"> | |||
| <HTML> | |||
| <HEAD><TITLE>Audit 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"/> | |||
| </FRAMESET> | |||
| <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> | |||
| <HEAD><TITLE>Audit 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"/> | |||
| </FRAMESET> | |||
| <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> | |||
| </HTML> | |||
| </xsl:template> | |||
| @@ -211,236 +211,236 @@ | |||
| <!-- print the violations of the class --> | |||
| <xsl:template match="class" mode="class.details"> | |||
| <xsl:variable name="package.name" select="@package"/> | |||
| <HTML> | |||
| <HEAD> | |||
| <xsl:call-template name="create.stylesheet.link"> | |||
| <xsl:with-param name="package.name" select="$package.name"/> | |||
| </xsl:call-template> | |||
| </HEAD> | |||
| <BODY> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:call-template name="class.audit.header"/> | |||
| <xsl:apply-templates select="." mode="print.audit"/> | |||
| </table> | |||
| <H3>Violations</H3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:call-template name="violation.audit.header"/> | |||
| <xsl:apply-templates select="./violation" mode="print.audit"> | |||
| <xsl:sort data-type="number" select="@line"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </BODY> | |||
| </HTML> | |||
| <xsl:variable name="package.name" select="@package"/> | |||
| <HTML> | |||
| <HEAD> | |||
| <xsl:call-template name="create.stylesheet.link"> | |||
| <xsl:with-param name="package.name" select="$package.name"/> | |||
| </xsl:call-template> | |||
| </HEAD> | |||
| <BODY> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:call-template name="class.audit.header"/> | |||
| <xsl:apply-templates select="." mode="print.audit"/> | |||
| </table> | |||
| <H3>Violations</H3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:call-template name="violation.audit.header"/> | |||
| <xsl:apply-templates select="./violation" mode="print.audit"> | |||
| <xsl:sort data-type="number" select="@line"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </BODY> | |||
| </HTML> | |||
| </xsl:template> | |||
| <!-- list of classes in a package --> | |||
| <xsl:template name="classes.list"> | |||
| <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> | |||
| <table width="100%"> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="$name"/></a></H2> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <h2>Classes</h2> | |||
| <TABLE WIDTH="100%"> | |||
| <xsl:apply-templates select="/classes/class[./@package = $name]" mode="classes.list"> | |||
| <xsl:sort select="@name"/> | |||
| </xsl:apply-templates> | |||
| </TABLE> | |||
| </BODY> | |||
| </HTML> | |||
| <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> | |||
| <table width="100%"> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="$name"/></a></H2> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <h2>Classes</h2> | |||
| <TABLE WIDTH="100%"> | |||
| <xsl:apply-templates select="/classes/class[./@package = $name]" mode="classes.list"> | |||
| <xsl:sort select="@name"/> | |||
| </xsl:apply-templates> | |||
| </TABLE> | |||
| </BODY> | |||
| </HTML> | |||
| </xsl:template> | |||
| <!-- the class to list --> | |||
| <xsl:template match="class" mode="classes.list"> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <!-- @bug naming to fix for inner classes --> | |||
| <a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <!-- @bug naming to fix for inner classes --> | |||
| <a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a> | |||
| </td> | |||
| </tr> | |||
| </xsl:template> | |||
| <!-- | |||
| Creates an all-classes.html file that contains a link to all package-summary.html | |||
| on each class. | |||
| Creates an all-classes.html file that contains a link to all package-summary.html | |||
| on each class. | |||
| --> | |||
| <xsl:template match="classes" mode="all.classes"> | |||
| <html> | |||
| <head> | |||
| <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=".//class" mode="all.classes"> | |||
| <xsl:sort select="@name"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| <html> | |||
| <head> | |||
| <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=".//class" mode="all.classes"> | |||
| <xsl:sort select="@name"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| </xsl:template> | |||
| <xsl:template match="class" mode="all.classes"> | |||
| <!-- (ancestor::package)[last()] is buggy in MSXML3 ? --> | |||
| <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="@name"/><xsl:text>.html</xsl:text> | |||
| </xsl:attribute> | |||
| <xsl:value-of select="@name"/> | |||
| </a> | |||
| </td> | |||
| </tr> | |||
| <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="@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 :( | |||
| 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="classes" mode="all.packages"> | |||
| <html> | |||
| <head> | |||
| <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="class[not(./@package = preceding-sibling::class/@package)]" mode="all.packages"> | |||
| <xsl:sort select="@package" order="ascending"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| <html> | |||
| <head> | |||
| <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="class[not(./@package = preceding-sibling::class/@package)]" mode="all.packages"> | |||
| <xsl:sort select="@package" order="ascending"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| </body> | |||
| </html> | |||
| </xsl:template> | |||
| <xsl:template match="class" mode="all.packages"> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a href="{translate(@package,'.','/')}/package-summary.html" target="classFrame"> | |||
| <xsl:value-of select="@package"/> | |||
| </a> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a href="{translate(@package,'.','/')}/package-summary.html" target="classFrame"> | |||
| <xsl:value-of select="@package"/> | |||
| </a> | |||
| </td> | |||
| </tr> | |||
| </xsl:template> | |||
| <xsl:template match="classes" mode="overview.packages"> | |||
| <html> | |||
| <head> | |||
| <xsl:call-template name="create.stylesheet.link"> | |||
| <xsl:with-param name="package.name"/> | |||
| </xsl:call-template> | |||
| </head> | |||
| <body onload="open('allclasses-frame.html','classListFrame')"> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <h3>Summary</h3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <tr> | |||
| <th>Audited classes</th> | |||
| <th>Reported classes</th> | |||
| <th>Violations</th> | |||
| </tr> | |||
| <tr class="a"> | |||
| <td><xsl:value-of select="@audited"/></td> | |||
| <td><xsl:value-of select="@reported"/></td> | |||
| <td><xsl:value-of select="@violations"/></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%"> | |||
| <tr> | |||
| <td style="text-align: justify;"> | |||
| Note: Rules checked have originated from style guidelines suggested by the language designers, | |||
| experience from the Java development community and insite experience. Violations are generally | |||
| reported with a reference to the <a href="http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html">Java Language Specifications</a> (JLS x.x.x) | |||
| and Metamata Audit rules (x.x). | |||
| Please consult these documents for additional information about violations. | |||
| <p/> | |||
| Rules checked also enforce adherence to <a href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Sun Java coding guidelines</a> in use at Jakarta. | |||
| <p/> | |||
| One should note that these violations do not necessary underline errors but should be used | |||
| as an indication for <i>possible</i> errors. As always, use your best judgment and review | |||
| them carefully, it might save you hours of debugging. | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <h3>Packages</h3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:call-template name="class.audit.header"/> | |||
| <xsl:for-each select="class[not(./@package = preceding-sibling::class/@package)]"> | |||
| <xsl:sort select="@package" order="ascending"/> | |||
| <tr> | |||
| <html> | |||
| <head> | |||
| <xsl:call-template name="create.stylesheet.link"> | |||
| <xsl:with-param name="package.name"/> | |||
| </xsl:call-template> | |||
| </head> | |||
| <body onload="open('allclasses-frame.html','classListFrame')"> | |||
| <xsl:call-template name="pageHeader"/> | |||
| <h3>Summary</h3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <tr> | |||
| <th>Audited classes</th> | |||
| <th>Reported classes</th> | |||
| <th>Violations</th> | |||
| </tr> | |||
| <tr class="a"> | |||
| <td><xsl:value-of select="@audited"/></td> | |||
| <td><xsl:value-of select="@reported"/></td> | |||
| <td><xsl:value-of select="@violations"/></td> | |||
| </tr> | |||
| </table> | |||
| <table border="0" width="100%"> | |||
| <tr> | |||
| <td style="text-align: justify;"> | |||
| Note: Rules checked have originated from style guidelines suggested by the language designers, | |||
| experience from the Java development community and insite experience. Violations are generally | |||
| reported with a reference to the <a href="http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html">Java Language Specifications</a> (JLS x.x.x) | |||
| and Metamata Audit rules (x.x). | |||
| Please consult these documents for additional information about violations. | |||
| <p/> | |||
| Rules checked also enforce adherence to <a href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Sun Java coding guidelines</a> in use at Jakarta. | |||
| <p/> | |||
| One should note that these violations do not necessary underline errors but should be used | |||
| as an indication for <i>possible</i> errors. As always, use your best judgment and review | |||
| them carefully, it might save you hours of debugging. | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| <h3>Packages</h3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:call-template name="class.audit.header"/> | |||
| <xsl:for-each select="class[not(./@package = preceding-sibling::class/@package)]"> | |||
| <xsl:sort select="@package" order="ascending"/> | |||
| <tr> | |||
| <xsl:call-template name="alternate-row"/> | |||
| <td><a href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of select="@package"/></a></td> | |||
| <td><xsl:value-of select="sum(/classes/class[./@package = current()/@package]/@violations)"/></td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </body> | |||
| </html> | |||
| <td><a href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of select="@package"/></a></td> | |||
| <td><xsl:value-of select="sum(/classes/class[./@package = current()/@package]/@violations)"/></td> | |||
| </tr> | |||
| </xsl:for-each> | |||
| </table> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </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="100%"> | |||
| <xsl:call-template name="class.metrics.header"/> | |||
| <xsl:apply-templates select="." mode="print.metrics"/> | |||
| </table--> | |||
| <xsl:if test="count(/classes/class[./@package = $name]) > 0"> | |||
| <H3>Classes</H3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:call-template name="class.audit.header"/> | |||
| <xsl:apply-templates select="/classes/class[./@package = $name]" mode="print.audit"> | |||
| <xsl:sort select="@name"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| </xsl:if> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </BODY> | |||
| </HTML> | |||
| <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="100%"> | |||
| <xsl:call-template name="class.metrics.header"/> | |||
| <xsl:apply-templates select="." mode="print.metrics"/> | |||
| </table--> | |||
| <xsl:if test="count(/classes/class[./@package = $name]) > 0"> | |||
| <H3>Classes</H3> | |||
| <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> | |||
| <xsl:call-template name="class.audit.header"/> | |||
| <xsl:apply-templates select="/classes/class[./@package = $name]" mode="print.audit"> | |||
| <xsl:sort select="@name"/> | |||
| </xsl:apply-templates> | |||
| </table> | |||
| </xsl:if> | |||
| <xsl:call-template name="pageFooter"/> | |||
| </BODY> | |||
| </HTML> | |||
| </xsl:template> | |||
| @@ -449,23 +449,23 @@ | |||
| @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: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: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 --> | |||
| @@ -479,13 +479,13 @@ | |||
| <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"><h2>Source Code Audit</h2></td> | |||
| </tr> | |||
| <tr> | |||
| <td style="text-align:right">Designed for use with <a href='http://www.webgain.com/products/quality_analyzer/'>Webgain QA/Metamata Audit</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td> | |||
| </tr> | |||
| <td style="text-align:right"><h2>Source Code Audit</h2></td> | |||
| </tr> | |||
| <tr> | |||
| <td style="text-align:right">Designed for use with <a href='http://www.webgain.com/products/quality_analyzer/'>Webgain QA/Metamata Audit</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td> | |||
| </tr> | |||
| </table> | |||
| <hr size="1"/> | |||
| <hr size="1"/> | |||
| </xsl:template> | |||
| <!-- Page HEADER --> | |||
| @@ -503,36 +503,36 @@ | |||
| <!-- class header --> | |||
| <xsl:template name="class.audit.header"> | |||
| <tr> | |||
| <th width="80%">Name</th> | |||
| <th>Violations</th> | |||
| </tr> | |||
| <tr> | |||
| <th width="80%">Name</th> | |||
| <th>Violations</th> | |||
| </tr> | |||
| </xsl:template> | |||
| <!-- method header --> | |||
| <xsl:template name="violation.audit.header"> | |||
| <tr> | |||
| <th>Line</th> | |||
| <th>Message</th> | |||
| </tr> | |||
| <tr> | |||
| <th>Line</th> | |||
| <th>Message</th> | |||
| </tr> | |||
| </xsl:template> | |||
| <!-- class information --> | |||
| <xsl:template match="class" mode="print.audit"> | |||
| <tr> | |||
| <tr> | |||
| <xsl:call-template name="alternate-row"/> | |||
| <td><a href="{@name}.html"><xsl:value-of select="@name"/></a></td> | |||
| <td><xsl:apply-templates select="@violations"/></td> | |||
| </tr> | |||
| <td><a href="{@name}.html"><xsl:value-of select="@name"/></a></td> | |||
| <td><xsl:apply-templates select="@violations"/></td> | |||
| </tr> | |||
| </xsl:template> | |||
| <xsl:template match="violation" mode="print.audit"> | |||
| <tr> | |||
| <tr> | |||
| <xsl:call-template name="alternate-row"/> | |||
| <td><xsl:value-of select="@line"/></td> | |||
| <td><xsl:apply-templates select="@message"/></td> | |||
| </tr> | |||
| <td><xsl:value-of select="@line"/></td> | |||
| <td><xsl:apply-templates select="@message"/></td> | |||
| </tr> | |||
| </xsl:template> | |||
| <!-- alternated row style --> | |||
| @@ -544,4 +544,4 @@ | |||
| </xsl:template> | |||
| </xsl:stylesheet> | |||