Update of /cvsroot/metamorphosis/antlets/checkstyle/src/resources/stylesheets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14395/checkstyle/src/resources/stylesheets
Added Files:
checkstyle.xsl checkstyle2xdocs.xsl checkstyle-simple.xsl
stylesheet.css checkstyle-frames.xsl checkstyle-noframes.xsl
Log Message:
use get to retrieve jars from internet
--- NEW FILE: checkstyle.xsl ---
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
The Apache Software License, Version 1.1
Copyright (c) 2002 The Apache Software Foundation. All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The end-user documentation included with the redistribution, if
any, must include the following acknowlegement:
"This product includes software developed by the
Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowlegement may appear in the software itself,
if and wherever such third-party acknowlegements normally appear.
4. The names "The Jakarta Project", "Ant", and "Apache Software
Foundation" must not be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact [email protected].
5. Products derived from this software may not be called "Apache"
nor may "Apache" appear in their names without prior written
permission of the Apache Group.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
====================================================================
This software consists of voluntary contributions made by many
individuals on behalf of the Apache Software Foundation. For more
information on the Apache Software Foundation, please see
<http://www.apache.org/>.
-->
<xsl:output method="html" indent="yes"/>
<xsl:template match="checkstyle">
<html>
<head>
<title>Checkstyle Analysis</title>
<style type="text/css"><![CDATA[
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><a name="top">Checkstyle Analysis</a></h1>
<p align="right">Designed for use with <a href="http://checkstyle.sourceforge.net/">Checkstyle</a> and <a href="http://jakarta.apache.org">Ant</a>.</p>
<hr size="2" />
<xsl:variable name = "total-errors" select = "count(file/error)" />
<h2>Summary of <xsl:value-of select="$total-errors"/> errors</h2>
<table width="100%" class="details">
<tr>
<th>Errors</th>
<th>File</th>
</tr>
<xsl:for-each select = "file">
<xsl:sort select="count(error)"
order="descending"
data-type="number"/>
<xsl:if test = "contains(@name,'.java')">
<xsl:variable name = "current-errors" select = "count(error)" />
<tr>
<xsl:choose>
<xsl:when test="$current-errors = 0">
<td>0</td>
</xsl:when>
<xsl:otherwise>
<td bgcolor="red"><xsl:value-of select="$current-errors" /></td>
</xsl:otherwise>
</xsl:choose>
<td><a><xsl:attribute name="href">#<xsl:value-of select="@name" /></xsl:attribute>
<xsl:value-of select="@name" /></a>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
<h2>Details</h2>
<xsl:apply-templates select = "file" />
</body>
</html>
</xsl:template>
<xsl:template match="file">
<xsl:if test = "contains(@name,'.java')">
<xsl:variable name = "file-errors" select = "count(error)" />
<xsl:choose>
<xsl:when test="$file-errors = 0">
<table width="100%" class="details">
<tr>
<th>
<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
<xsl:value-of select="@name"/>
</th>
</tr>
<tr>
<td>No errors :-)</td>
</tr>
</table>
</xsl:when>
<xsl:otherwise>
<table width="100%" class="details">
<th colspan="2">
<xsl:attribute name="id"><xsl:value-of select="@name"/></xsl:attribute>
<xsl:value-of select="@name"/>
</th>
<tr>
<th>Line</th>
<th>Error</th>
</tr>
<xsl:apply-templates select = "error" />
</table>
</xsl:otherwise>
</xsl:choose>
<hr/>
</xsl:if>
</xsl:template>
<xsl:template match="error">
<tr>
<td align="left"><xsl:value-of select="@line"/></td>
<td align="left"><xsl:value-of select="@message"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
--- NEW FILE: checkstyle2xdocs.xsl ---
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
extension-element-prefixes="redirect">
<!--$Header: /cvsroot/metamorphosis/antlets/checkstyle/src/resources/stylesheets/checkstyle2xdocs.xsl,v 1.1 2004/02/25 22:09:29 homeijer Exp $ -->
<!-- xsl:output method = "xml" indent="yes" encoding="UTF-8" / -->
<xsl:output method = "xml" doctype-public="-//APACHE//DTD Documentation V1.1//EN" doctype-system="./dtd/document-v11.dtd"/>
<xsl:param name="basedir">src/java</xsl:param>
<xsl:template match="/">
<xsl:apply-templates select="/checkstyle"/>
<xsl:apply-templates select="/checkstyle" mode="book"/>
<xsl:apply-templates select="/checkstyle/file"/>
</xsl:template>
<xsl:template match="/checkstyle">
<document>
<header>
<title>Checkstyle Analysis</title>
</header>
<body>
<section>
<title>Checkstyle Analysis</title>
<p>This page details coding standard errors found in the
Java source code for this project. These are style
errors and as such do not prevent the code from running,
however, many people argue that well styled code is
easily readable, and that easily readable code is easier
to maintain.</p>
<xsl:variable name = "total-errors" select =
"count(file/error)" />
<section>
<title>Summary</title>
<p>Summary of <xsl:value-of select="$total-errors"/>
errors</p>
<table>
<tr>
<th>Errors</th>
<th>File</th>
</tr>
<xsl:for-each select = "file">
<xsl:sort select="count(error)"
order="descending" data-type="number"/>
<xsl:if test = "contains(@name,'.java')">
<xsl:variable name = "current-errors" select
= "count(error)" />
<tr>
<xsl:choose>
<xsl:when test="$current-errors = 0"
>
<td>0</td>
</xsl:when>
<xsl:otherwise>
<td>
<xsl:value-of
select="$current-errors"
/>
</td>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:apply-templates select="." mode="displayName"/>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</section>
<p>Generated by <link
href="http://checkstyle.sourceforge.net/">Checkstyle</link>
and <link href="http://ant.apache.org">Ant</link>.</p>
</section>
</body>
</document>
</xsl:template>
<xsl:template match="file">
<xsl:variable name="cleanName">
<xsl:value-of select="translate(@name,':/\\','_..')"/>
</xsl:variable>
<xsl:variable name="filename">
<xsl:apply-templates select="." mode="fileName"/><xsl:text>.xml</xsl:text>
</xsl:variable>
<redirect:write select="$filename">
<xsl:variable name = "file-errors" select = "count(error)" />
<document>
<header>
<title>Checkstyle Analysis of <xsl:apply-templates select="." mode="displayName"/> </title>
</header>
<body>
<section>
<title>Checkstyle Analysis</title>
<p>This page details coding standard errors found in the
Java source code for this project. These are style
errors and as such do not prevent the code from
running, however, many people argue that well styled
code is easily readable, and that easily readable
code is easier to maintain.</p>
<xsl:variable name = "total-errors" select =
"count(file/error)" />
<section>
<title>Details</title>
<p>
<xsl:choose>
<xsl:when test="$file-errors = 0">
<table>
<tr>
<th>
<xsl:value-of select="@name"/> </th>
</tr>
<tr>
<td>No errors :-)</td>
</tr>
</table>
</xsl:when>
<xsl:otherwise>
<table>
<th colspan="2">
<xsl:value-of select="@name"/>
</th>
<tr>
<th>Line</th>
<th>Error</th>
</tr>
<xsl:apply-templates select =
"error" />
</table>
</xsl:otherwise>
</xsl:choose>
</p>
</section>
<p>Generated by <link
href="http://checkstyle.sourceforge.net/">Checkstyle</link>
and <link href="http://ant.apache.org">Ant</link>
.</p>
</section>
</body>
</document>
</redirect:write>
</xsl:template>
<xsl:template match="error">
<tr>
<td width="6%">
<xsl:value-of select="@line"/>
</td>
<td>
<xsl:value-of select="@message"/>
</td>
</tr>
</xsl:template>
<xsl:template match="/checkstyle" mode="book">
<redirect:write file="book.xml">
<book software="@SOFTWARE@" title="@name"
copyright="@year@ Krysalis Project"
xmlns:xlink="http://www.w3.org/1999/xlink">
<menu label="Project">
<menu-item label="back" href="../index.html"/>
</menu>
<menu label="Analysis">
<menu-item label="Summary" href="index.html"/>
<xsl:for-each select = "file">
<menu-item >
<xsl:attribute name="label">
<xsl:apply-templates select="." mode="displayName"/>
</xsl:attribute>
<xsl:attribute name="href">
<xsl:apply-templates select="." mode="fileName"/><xsl:text>.html</xsl:text>
</xsl:attribute>
</menu-item>
</xsl:for-each>
</menu>
</book>
</redirect:write>
</xsl:template>
<xsl:template match="file" mode="fileName">
<xsl:if test = "contains(@name,'.java')">
<xsl:value-of select="substring-before(translate(@name,':/\\','_..'),'.java')"/>
</xsl:if>
<xsl:if test = "contains(@name,'package.html')">
<xsl:value-of
select="substring-after(substring-before(translate(substring-after(@name,$basedir),':/\\','_..'),'.package.html'),'.')"/>
</xsl:if>
</xsl:template>
<xsl:template match="file" mode="displayName">
<xsl:if test = "contains(@name,'.java')">
<xsl:value-of select="substring-before(translate(@name,':/\\','_..'),'.java')"/>
</xsl:if>
<xsl:if test = "contains(@name,'package.html')">
<xsl:value-of
select="substring-after(substring-before(translate(substring-after(@name,$basedir),':/\\','_..'),'.package.html'),'.')"/>
</xsl:if> </xsl:template>
</xsl:stylesheet>
--- NEW FILE: checkstyle-simple.xsl ---
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>Sun Coding Style Violations</title>
</head>
<body bgcolor="#FFFFEF">
<p><b>Coding Style Check Results</b></p>
<table border="1" cellspacing="0" cellpadding="2">
<tr bgcolor="#CC9966">
<th colspan="2"><b>Summary</b></th>
</tr>
<tr bgcolor="#CCF3D0">
<td>Total files checked</td>
<td><xsl:number level="any" value="count(descendant::file)"/></td>
</tr>
<tr bgcolor="#F3F3E1">
<td>Files with errors</td>
<td><xsl:number level="any" value="count(descendant::file[error])"/></td>
</tr>
<tr bgcolor="#CCF3D0">
<td>Total errors</td>
<td><xsl:number level="any" value="count(descendant::error)"/></td>
</tr>
<tr bgcolor="#F3F3E1">
<td>Errors per file</td>
<td><xsl:number level="any" value="count(descendant::error) div count(descendant::file)"/></td>
</tr>
</table>
<hr align="left" width="95%" size="1"/>
<p>The following are violations of the Sun Coding-Style Standards:</p>
<p/>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="file[error]">
<table bgcolor="#AFFFFF" width="95%" border="1" cellspacing="0" cellpadding="2">
<tr>
<th> File: </th>
<td>
<xsl:value-of select="@name"/>
</td>
</tr>
</table>
<table bgcolor="#DFFFFF" width="95%" border="1" cellspacing="0" cellpadding="2">
<tr>
<th> Line Number </th>
<th> Error Message </th>
</tr>
<xsl:apply-templates select="error"/>
</table>
<p/>
</xsl:template>
<xsl:template match="error">
<tr>
<td>
<xsl:value-of select="@line"/>
</td>
<td>
<xsl:value-of select="@message"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
--- NEW FILE: stylesheet.css ---
<style type=text/css>
A {
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 8pt;
font-style: normal;
font-weight: normal;
}
A:link {
color: #000090
}
A:visited {
color: #000090
}
A:active {
color: #000090
}
FONT {
color: black
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;
font-weight: normal;
}
FONT.Reverse { color: white }
FONT.Small {
font-size: 10pt;
}
BODY {
color: #000000;
background-color: #ffffff;
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;
font-weight: normal;
}
P {
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;
font-weight: normal;
}
P.Summary {
font-size: 12pt;
font-weight: bold;
}
P.Small-Summary {
color: #000090;
font-size: 10pt;
font-style: italic;
font-weight: bold;
}
P.Navigation {
color: #000090;
font-size: 10pt;
font-style: normal;
font-weight: normal;
}
P.Section1 {
font-style: italic;
font-weight: bold;
}
P.BookAuthor {
font-size: 10pt;
font-style: italic;
}
P.Address {
font-size: 10pt;
text-align: right;
}
P.Copyright {
font-size: 9pt;
font-weight: bold;
}
TABLE {
background-color: white;
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;
font-weight: normal;
}
TABLE.Primary {
background-color: #000090
}
TABLE.Secondary {
background-color: #EDEDED
}
TD {
color: black;
background-color: white;
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;
font-weight: normal;
}
TD.Primary {
background-color: #000090
}
TD.Secondary {
background-color: #EDEDED
}
TD.Author {
background-color: #EDEDED;
font-size: 12pt;
font-style: italic;
}
TD.Border {
background-color: #000090;
height: 1;
font-size: 2pt;
font-weight: bolder;
}
TD.PageTitle {
color: white;
background-color: #000090;
font-size: 22pt;
font-weight: bold;
text-align: center;
}
TD.Header {
color: white;
background-color: #000090;
font-size: 14pt;
font-style: normal;
font-weight: bold;
vertical-align: middle;
}
TD.SubHeader {
color: #000090;
background-color: #EDEDED;
font-size: 12pt;
font-style: normal;
font-weight: bold;
vertical-align: middle;
}
UL {
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;
font-weight: normal;
}
UL.Contrast {
color: #000090;
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 10pt;
font-style: normal;
font-weight: bold;
}
.Bold {
color: #000090;
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;
font-weight: bold;
}
OL {
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;
font-weight: normal;
}
CODE {
font-family: "Lucida Console", Courier;
font-size: 10pt;
font-style: normal;
font-weight: normal;
}
.Bold {
color: #000090;
font-family: Lucida, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;
font-weight: bold;
}
</style>
--- NEW FILE: checkstyle-frames.xsl ---
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
extension-element-prefixes="redirect">
<!--
The Apache Software License, Version 1.1
Copyright (c) 2002 The Apache Software Foundation. All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The end-user documentation included with the redistribution, if
any, must include the following acknowlegement:
"This product includes software developed by the
Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowlegement may appear in the software itself,
if and wherever such third-party acknowlegements normally appear.
4. The names "The Jakarta Project", "Ant", and "Apache Software
Foundation" must not be used to endorse or promote products derived
from this software without prior written permission. For written
permission, please contact [email protected].
5. Products derived from this software may not be called "Apache"
nor may "Apache" appear in their names without prior written
permission of the Apache Group.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
====================================================================
This software consists of voluntary contributions made by many
individuals on behalf of the Apache Software Foundation. For more
information on the Apache Software Foundation, please see
<http://www.apache.org/>.
-->
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<xsl:param name="output.dir" select="'.'"/>
<xsl:template match="checkstyle">
<!-- 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-summary.html at the root -->
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="overview"/>
</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 files -->
<xsl:apply-templates select="file"/>
</xsl:template>
<xsl:template name="index.html">
<html>
<head>
<title>CheckStyle Audit</title>
</head>
<frameset cols="20%,80%">
<frame src="allclasses-frame.html" name="fileListFrame"/>
<frame src="overview-frame.html" name="fileFrame"/>
</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>
<xsl:template name="pageHeader">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="text-align:right"><h2>CheckStyle Audit</h2></td>
</tr>
<tr>
<td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
</xsl:template>
<xsl:template match="checkstyle" mode="overview">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<!-- page header -->
<xsl:call-template name="pageHeader"/>
<!-- Summary part -->
<xsl:apply-templates select="." mode="summary"/>
<hr size="1" width="100%" align="left"/>
<!-- File list part -->
<xsl:apply-templates select="." mode="filelist"/>
</body>
</html>
</xsl:template>
<xsl:template name="stylesheet.css">
.bannercell {
border: 0px;
padding: 0px;
}
body {
margin-left: 10;
margin-right: 10;
font:normal 80% arial,helvetica,sanserif;
background-color:#FFFFFF;
color:#000000;
}
.a td {
background: #efefef;
}
.b td {
background: #fff;
}
th, td {
text-align: left;
vertical-align: top;
}
th {
font-weight:bold;
background: #ccc;
color: black;
}
table, th, td {
font-size:100%;
border: none
}
table.log tr td, tr th {
}
h2 {
font-weight:bold;
font-size:140%;
margin-bottom: 5;
}
h3 {
font-size:100%;
font-weight:bold;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0;
}
</xsl:template>
<!--
Creates an all-classes.html file that contains a link to all files.
-->
<xsl:template match="checkstyle" mode="all.classes">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<h2>Files</h2>
<p>
<table width="100%">
<!-- For each file create its part -->
<xsl:apply-templates select="file" mode="all.classes">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</p>
</body>
</html>
</xsl:template>
<xsl:template match="checkstyle" mode="filelist">
<h3>Files</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Name</th>
<th>Errors</th>
</tr>
<xsl:apply-templates select="file" mode="filelist">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="file" mode="filelist">
<tr>
<xsl:call-template name="alternated-row"/>
<td nowrap="nowrap">
<a>
<xsl:attribute name="href">
<xsl:text>files/</xsl:text><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</td>
<td><xsl:value-of select="count(error)"/></td>
</tr>
</xsl:template>
<xsl:template match="file" mode="all.classes">
<tr>
<td nowrap="nowrap">
<a target="fileFrame">
<xsl:attribute name="href">
<xsl:text>files/</xsl:text><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</td>
</tr>
</xsl:template>
<!--
transform string like a/b/c to ../../../
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
<xsl:param name="path"/>
<xsl:if test="contains($path,'/')">
<xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of select="substring-after($path,'/')"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path,'/')) and not($path = '')">
<xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="file">
<redirect:write file="{$output.dir}/files/{@name}.html">
<html>
<head>
<link rel="stylesheet" type="text/css">
<xsl:attribute name="href"><xsl:call-template name="path"><xsl:with-param name="path" select="@name"/></xsl:call-template><xsl:text>stylesheet.css</xsl:text></xsl:attribute>
</link>
</head>
<body>
<xsl:call-template name="pageHeader"/>
<h3>File <xsl:value-of select="@name"/></h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Error Description</th>
<th>Line</th>
</tr>
<xsl:for-each select="error">
<tr>
<xsl:call-template name="alternated-row"/>
<td><xsl:value-of select="@message"/></td>
<td><xsl:value-of select="@line"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</redirect:write>
</xsl:template>
<xsl:template match="checkstyle" mode="summary">
<h3>Summary</h3>
<xsl:variable name="fileCount" select="count(file)"/>
<xsl:variable name="errorCount" select="count(file/error)"/>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Files</th>
<th>Errors</th>
</tr>
<tr>
<xsl:call-template name="alternated-row"/>
<td><xsl:value-of select="$fileCount"/></td>
<td><xsl:value-of select="$errorCount"/></td>
</tr>
</table>
</xsl:template>
<xsl:template name="alternated-row">
<xsl:attribute name="class">
<xsl:if test="position() mod 2 = 1">a</xsl:if>
<xsl:if test="position() mod 2 = 0">b</xsl:if>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
--- NEW FILE: checkstyle-noframes.xsl ---
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<!-- Checkstyle XML Style Sheet by Stephane Bailliez <[email protected]> -->
<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
<!-- Usage (generates checkstyle_report.html): -->
<!-- <checkstyle -->
<!-- allowTabs="true" -->
<!-- allowProtected="false" -->
<!-- allowNoAuthor="false" -->
<!-- maxLineLen="132" -->
<!-- memberPattern="." -->
<!-- publicMemberPattern="^[a-z][a-zA-Z0-9]*$" -->
<!-- paramPattern="^[a-z][a-zA-Z0-9]*$" -->
<!-- constPattern="^[A-Z][A-Z0-9_]*$" -->
<!-- staticPattern="^[a-z][a-zA-Z0-9]*$" -->
<!-- typePattern="^[A-Z][a-zA-Z0-9]*$" -->
<!-- ignoreImports="true" -->
<!-- ignoreWhitespace="true" -->
<!-- ignoreBraces="false" -->
<!-- failOnViolation="false"> -->
<!-- <fileset dir="${src.dir}" includes="**/*.java"/> -->
<!-- <formatter type="plain"/> -->
<!-- <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/> -->
<!-- </checkstyle> -->
<!-- <style basedir="${doc.dir}" destdir="${doc.dir}" -->
<!-- includes="checkstyle_report.xml" -->
<!-- style="${doc.dir}/checkstyle-noframes.xsl"/> -->
<xsl:template match="checkstyle">
<html>
<head>
<style type="text/css">
.bannercell {
border: 0px;
padding: 0px;
}
body {
margin-left: 10;
margin-right: 10;
font:normal 80% arial,helvetica,sanserif;
background-color:#FFFFFF;
color:#000000;
}
.a td {
background: #efefef;
}
.b td {
background: #fff;
}
th, td {
text-align: left;
vertical-align: top;
}
th {
font-weight:bold;
background: #ccc;
color: black;
}
table, th, td {
font-size:100%;
border: none
}
table.log tr td, tr th {
}
h2 {
font-weight:bold;
font-size:140%;
margin-bottom: 5;
}
h3 {
font-size:100%;
font-weight:bold;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0;
}
</style>
</head>
<body>
<a name="#top"></a>
<!-- jakarta logo -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="bannercell" rowspan="2">
<!--a href="http://jakarta.apache.org/">
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
</a-->
</td>
<td class="text-align:right"><h2>CheckStyle Audit</h2></td>
</tr>
<tr>
<td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
<!-- Summary part -->
<xsl:apply-templates select="." mode="summary"/>
<hr size="1" width="100%" align="left"/>
<!-- Package List part -->
<xsl:apply-templates select="." mode="filelist"/>
<hr size="1" width="100%" align="left"/>
<!-- For each package create its part -->
<xsl:for-each select="file">
<xsl:sort select="@name"/>
<xsl:apply-templates select="."/>
<p/>
<p/>
</xsl:for-each>
<hr size="1" width="100%" align="left"/>
</body>
</html>
</xsl:template>
<xsl:template match="checkstyle" mode="filelist">
<h3>Files</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Name</th>
<th>Errors</th>
</tr>
<xsl:for-each select="file">
<xsl:sort select="@name"/>
<xsl:variable name="errorCount" select="count(error)"/>
<tr>
<xsl:call-template name="alternated-row"/>
<td><a href="#{@name}"><xsl:value-of select="@name"/></a></td>
<td><xsl:value-of select="$errorCount"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="file">
<a name="#{@name}"></a>
<h3>File <xsl:value-of select="@name"/></h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Error Description</th>
<th>Line</th>
</tr>
<xsl:for-each select="error">
<tr>
<xsl:call-template name="alternated-row"/>
<td><xsl:value-of select="@message"/></td>
<td><xsl:value-of select="@line"/></td>
</tr>
</xsl:for-each>
</table>
<a href="#top">Back to top</a>
</xsl:template>
<xsl:template match="checkstyle" mode="summary">
<h3>Summary</h3>
<xsl:variable name="fileCount" select="count(file)"/>
<xsl:variable name="errorCount" select="count(file/error)"/>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Files</th>
<th>Errors</th>
</tr>
<tr>
<xsl:call-template name="alternated-row"/>
<td><xsl:value-of select="$fileCount"/></td>
<td><xsl:value-of select="$errorCount"/></td>
</tr>
</table>
</xsl:template>
<xsl:template name="alternated-row">
<xsl:attribute name="class">
<xsl:if test="position() mod 2 = 1">a</xsl:if>
<xsl:if test="position() mod 2 = 0">b</xsl:if>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.