PageRenderTime 203ms CodeModel.GetById 80ms app.highlight 3ms RepoModel.GetById 118ms app.codeStats 0ms

/asl/lib/checkstyle/xsl/checkstyle-noframes.xsl

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Extensible Stylesheet Language Transformations | 179 lines | 160 code | 19 blank | 0 comment | 0 complexity | fd6339d6ab6c134c5bf3680d0e58e9fc MD5 | raw file
  1<xsl:stylesheet	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  2<xsl:output method="html" indent="yes"/>
  3<xsl:decimal-format decimal-separator="." grouping-separator="," />
  4
  5<!-- Checkstyle XML Style Sheet by Stephane Bailliez <sbailliez@apache.org>         -->
  6<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
  7<!-- Usage (generates checkstyle_report.html):                                      -->
  8<!--    <checkstyle failonviolation="false" config="${check.config}">               -->
  9<!--      <fileset dir="${src.dir}" includes="**/*.java"/>                          -->
 10<!--      <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/>         -->
 11<!--    </checkstyle>                                                               -->
 12<!--    <style basedir="${doc.dir}" destdir="${doc.dir}"                            -->
 13<!--            includes="checkstyle_report.xml"                                    -->
 14<!--            style="${doc.dir}/checkstyle-noframes.xsl"/>                        -->
 15
 16<xsl:template match="checkstyle">
 17	<html>
 18		<head>
 19		<style type="text/css">
 20    .bannercell {
 21      border: 0px;
 22      padding: 0px;
 23    }
 24    body {
 25      margin-left: 10;
 26      margin-right: 10;
 27      font:normal 80% arial,helvetica,sanserif;
 28      background-color:#FFFFFF;
 29      color:#000000;
 30    }
 31    .a td { 
 32      background: #efefef;
 33    }
 34    .b td { 
 35      background: #fff;
 36    }
 37    th, td {
 38      text-align: left;
 39      vertical-align: top;
 40    }
 41    th {
 42      font-weight:bold;
 43      background: #ccc;
 44      color: black;
 45    }
 46    table, th, td {
 47      font-size:100%;
 48      border: none
 49    }
 50    table.log tr td, tr th {
 51      
 52    }
 53    h2 {
 54      font-weight:bold;
 55      font-size:140%;
 56      margin-bottom: 5;
 57    }
 58    h3 {
 59      font-size:100%;
 60      font-weight:bold;
 61      background: #525D76;
 62      color: white;
 63      text-decoration: none;
 64      padding: 5px;
 65      margin-right: 2px;
 66      margin-left: 2px;
 67      margin-bottom: 0;
 68    }
 69		</style>
 70		</head>
 71		<body>
 72			<a name="top"></a>
 73      <!-- jakarta logo -->
 74      <table border="0" cellpadding="0" cellspacing="0" width="100%">
 75      <tr>
 76        <td class="bannercell" rowspan="2">
 77          <!--a href="http://jakarta.apache.org/">
 78          <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
 79          </a-->
 80        </td>
 81    		<td class="text-align:right"><h2>CheckStyle Audit</h2></td>
 82    		</tr>
 83    		<tr>
 84    		<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>
 85    		</tr>
 86      </table>
 87    	<hr size="1"/>
 88			
 89			<!-- Summary part -->
 90			<xsl:apply-templates select="." mode="summary"/>
 91			<hr size="1" width="100%" align="left"/>
 92			
 93			<!-- Package List part -->
 94			<xsl:apply-templates select="." mode="filelist"/>
 95			<hr size="1" width="100%" align="left"/>
 96			
 97			<!-- For each package create its part -->
 98			<xsl:for-each select="file">
 99			  <xsl:sort select="@name"/>
100			  <xsl:apply-templates select="."/>
101			  <p/>
102			  <p/>
103			</xsl:for-each>
104			<hr size="1" width="100%" align="left"/>
105			
106			
107		</body>
108	</html>
109</xsl:template>
110	
111	
112	
113	<xsl:template match="checkstyle" mode="filelist">	
114		<h3>Files</h3>
115		<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
116      <tr>
117        <th>Name</th>
118        <th>Errors</th>
119      </tr>
120			<xsl:for-each select="file">
121				<xsl:sort select="@name"/>
122				<xsl:variable name="errorCount" select="count(error)"/>				
123				<tr>
124          <xsl:call-template name="alternated-row"/>
125					<td><a href="#f-{@name}"><xsl:value-of select="@name"/></a></td>
126					<td><xsl:value-of select="$errorCount"/></td>
127				</tr>
128			</xsl:for-each>
129		</table>		
130	</xsl:template>
131	
132	
133	<xsl:template match="file">
134    <a name="f-{@name}"></a>
135    <h3>File <xsl:value-of select="@name"/></h3>
136    
137    <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
138    	<tr>
139    	  <th>Error Description</th>
140    	  <th>Line</th>
141      </tr>
142      <xsl:for-each select="error">
143    	<tr>
144        <xsl:call-template name="alternated-row"/>
145    	  <td><xsl:value-of select="@message"/></td>
146    	  <td><xsl:value-of select="@line"/></td>
147    	</tr>
148    	</xsl:for-each>
149    </table>
150    <a href="#top">Back to top</a>
151	</xsl:template>
152	
153	
154	<xsl:template match="checkstyle" mode="summary">
155		<h3>Summary</h3>
156		<xsl:variable name="fileCount" select="count(file)"/>
157		<xsl:variable name="errorCount" select="count(file/error)"/>
158		<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
159		<tr>
160			<th>Files</th>
161			<th>Errors</th>
162		</tr>
163		<tr>
164		  <xsl:call-template name="alternated-row"/>
165			<td><xsl:value-of select="$fileCount"/></td>
166			<td><xsl:value-of select="$errorCount"/></td>
167		</tr>
168		</table>
169	</xsl:template>
170	
171  <xsl:template name="alternated-row">
172    <xsl:attribute name="class">
173      <xsl:if test="position() mod 2 = 1">a</xsl:if>
174      <xsl:if test="position() mod 2 = 0">b</xsl:if>
175    </xsl:attribute>  
176  </xsl:template>	
177</xsl:stylesheet>
178
179