maudit-frames.xsl revision 0
10139N/A<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
10139N/A xmlns:lxslt="http://xml.apache.org/xslt"
10139N/A xmlns:redirect="org.apache.xalan.lib.Redirect"
10139N/A<xsl:param name="output.dir" select="'.'"/>
10139N/A <!-- create the index.html -->
10139N/A <xsl:call-template name="index.html"/>
10139N/A <!-- create the stylesheet.css -->
10139N/A <xsl:call-template name="stylesheet.css"/>
10139N/A <!-- create the overview-packages.html at the root -->
10139N/A <xsl:apply-templates select="." mode="overview.packages"/>
10139N/A <!-- create the all-packages.html at the root -->
10139N/A <xsl:apply-templates select="." mode="all.packages"/>
10139N/A <!-- create the all-classes.html at the root -->
10139N/A <xsl:apply-templates select="." mode="all.classes"/>
10139N/A <xsl:variable name="package.dir">
10139N/A <!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
10139N/A <!-- create a classes-list.html in the package directory -->
10139N/A <xsl:call-template name="classes.list">
10139N/A <!-- create a package-summary.html in the package directory -->
10139N/A <xsl:call-template name="package.summary">
10139N/A <!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
10139N/A <xsl:for-each select="/classes/class[@package = $name]">
10139N/A <xsl:apply-templates select="." mode="class.details"/>
10139N/A<xsl:template name="index.html">
16990N/A <FRAME src="overview-frame.html" name="packageListFrame"/>
16783N/A <FRAME src="allclasses-frame.html" name="classListFrame"/>
16657N/A <FRAME src="overview-summary.html" name="classFrame"/>
16630N/A This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
15870N/A<xsl:template name="stylesheet.css">
10592N/A<xsl:template match="class" mode="class.details">
10592N/A <xsl:variable name="package.name" select="@package"/>
10287N/A <xsl:call-template name="create.stylesheet.link">
10179N/A <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
10139N/A <xsl:call-template name="class.audit.header"/>
10139N/A <xsl:apply-templates select="." mode="print.audit"/>
10139N/A <xsl:call-template name="violation.audit.header"/>
10139N/A <xsl:apply-templates select="./violation" mode="print.audit">
10139N/A<xsl:template name="classes.list">
10139N/A <xsl:call-template name="create.stylesheet.link">
10139N/A <xsl:with-param name="package.name" select="$name"/>
10139N/A <H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="$name"/></a></H2>
16630N/A<xsl:template match="class" mode="classes.list">
10139N/A<xsl:template match="classes" mode="all.classes">
10139N/A <xsl:call-template name="create.stylesheet.link">
10139N/A <xsl:with-param name="package.name"/>
10139N/A <xsl:apply-templates select=".//class" mode="all.classes">
10139N/A<xsl:template match="class" mode="all.classes">
10139N/A <xsl:variable name="package.name" select="@package"/>
16630N/A <xsl:if test="not($package.name='')">
10139N/A <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
16630N/A Creates an html file that contains a link to all package-summary.html files on
10139N/A<xsl:template match="classes" mode="all.packages">
10139N/A <xsl:call-template name="create.stylesheet.link">
16630N/A <xsl:with-param name="package.name"/>
10139N/A <h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
10139N/A <xsl:apply-templates select="class[not(./@package = preceding-sibling::class/@package)]" mode="all.packages">
14525N/A<xsl:template match="class" mode="all.packages">
<a href="{translate(@package,'.','/')}/package-summary.html" target="classFrame">
<xsl:template match="classes" mode="overview.packages">
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name"/>
<body onload="open('allclasses-frame.html','classListFrame')">
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).
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.
<xsl:call-template name="class.audit.header"/>
<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>
<xsl:template name="package.summary">
<xsl:call-template name="create.stylesheet.link">
<xsl:with-param name="package.name" select="$name"/>
<xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
<xsl:call-template name="class.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
<xsl:if test="count(/classes/class[./@package = $name]) > 0">
<xsl:call-template name="class.audit.header"/>
transform string like a.b.c to ../../../
<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>
<a href="http://jakarta.apache.org/">
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
<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>
<xsl:template name="class.audit.header">
<xsl:template name="violation.audit.header">
<xsl:template match="class" mode="print.audit">
<xsl:template match="violation" mode="print.audit">