(no commit message)
[utils] / build / checkstyle-noframes.xsl
diff --git a/build/checkstyle-noframes.xsl b/build/checkstyle-noframes.xsl
new file mode 100644 (file)
index 0000000..5f18134
--- /dev/null
@@ -0,0 +1,179 @@
+<xsl:stylesheet        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">\r
+<xsl:output method="html" indent="yes"/>\r
+<xsl:decimal-format decimal-separator="." grouping-separator="," />\r
+\r
+<!-- Checkstyle XML Style Sheet by Stephane Bailliez <sbailliez@apache.org>         -->\r
+<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->\r
+<!-- Usage (generates checkstyle_report.html):                                      -->\r
+<!--    <checkstyle failonviolation="false" config="${check.config}">               -->\r
+<!--      <fileset dir="${src.dir}" includes="**/*.java"/>                          -->\r
+<!--      <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/>         -->\r
+<!--    </checkstyle>                                                               -->\r
+<!--    <style basedir="${doc.dir}" destdir="${doc.dir}"                            -->\r
+<!--            includes="checkstyle_report.xml"                                    -->\r
+<!--            style="${doc.dir}/checkstyle-noframes.xsl"/>                        -->\r
+\r
+<xsl:template match="checkstyle">\r
+       <html>\r
+               <head>\r
+               <style type="text/css">\r
+    .bannercell {\r
+      border: 0px;\r
+      padding: 0px;\r
+    }\r
+    body {\r
+      margin-left: 10;\r
+      margin-right: 10;\r
+      font:normal 80% arial,helvetica,sanserif;\r
+      background-color:#FFFFFF;\r
+      color:#000000;\r
+    }\r
+    .a td { \r
+      background: #efefef;\r
+    }\r
+    .b td { \r
+      background: #fff;\r
+    }\r
+    th, td {\r
+      text-align: left;\r
+      vertical-align: top;\r
+    }\r
+    th {\r
+      font-weight:bold;\r
+      background: #ccc;\r
+      color: black;\r
+    }\r
+    table, th, td {\r
+      font-size:100%;\r
+      border: none\r
+    }\r
+    table.log tr td, tr th {\r
+      \r
+    }\r
+    h2 {\r
+      font-weight:bold;\r
+      font-size:140%;\r
+      margin-bottom: 5;\r
+    }\r
+    h3 {\r
+      font-size:100%;\r
+      font-weight:bold;\r
+      background: #525D76;\r
+      color: white;\r
+      text-decoration: none;\r
+      padding: 5px;\r
+      margin-right: 2px;\r
+      margin-left: 2px;\r
+      margin-bottom: 0;\r
+    }\r
+               </style>\r
+               </head>\r
+               <body>\r
+                       <a name="top"></a>\r
+      <!-- jakarta logo -->\r
+      <table border="0" cellpadding="0" cellspacing="0" width="100%">\r
+      <tr>\r
+        <td class="bannercell" rowspan="2">\r
+          <!--a href="http://jakarta.apache.org/">\r
+          <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>\r
+          </a-->\r
+        </td>\r
+               <td class="text-align:right"><h2>CheckStyle Audit</h2></td>\r
+               </tr>\r
+               <tr>\r
+               <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>\r
+               </tr>\r
+      </table>\r
+       <hr size="1"/>\r
+                       \r
+                       <!-- Summary part -->\r
+                       <xsl:apply-templates select="." mode="summary"/>\r
+                       <hr size="1" width="100%" align="left"/>\r
+                       \r
+                       <!-- Package List part -->\r
+                       <xsl:apply-templates select="." mode="filelist"/>\r
+                       <hr size="1" width="100%" align="left"/>\r
+                       \r
+                       <!-- For each package create its part -->\r
+                       <xsl:for-each select="file">\r
+                         <xsl:sort select="@name"/>\r
+                         <xsl:apply-templates select="."/>\r
+                         <p/>\r
+                         <p/>\r
+                       </xsl:for-each>\r
+                       <hr size="1" width="100%" align="left"/>\r
+                       \r
+                       \r
+               </body>\r
+       </html>\r
+</xsl:template>\r
+       \r
+       \r
+       \r
+       <xsl:template match="checkstyle" mode="filelist">       \r
+               <h3>Files</h3>\r
+               <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">\r
+      <tr>\r
+        <th>Name</th>\r
+        <th>Errors</th>\r
+      </tr>\r
+                       <xsl:for-each select="file">\r
+                               <xsl:sort select="@name"/>\r
+                               <xsl:variable name="errorCount" select="count(error)"/>                         \r
+                               <tr>\r
+          <xsl:call-template name="alternated-row"/>\r
+                                       <td><a href="#f-{@name}"><xsl:value-of select="@name"/></a></td>\r
+                                       <td><xsl:value-of select="$errorCount"/></td>\r
+                               </tr>\r
+                       </xsl:for-each>\r
+               </table>                \r
+       </xsl:template>\r
+       \r
+       \r
+       <xsl:template match="file">\r
+    <a name="f-{@name}"></a>\r
+    <h3>File <xsl:value-of select="@name"/></h3>\r
+    \r
+    <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">\r
+       <tr>\r
+         <th>Error Description</th>\r
+         <th>Line</th>\r
+      </tr>\r
+      <xsl:for-each select="error">\r
+       <tr>\r
+        <xsl:call-template name="alternated-row"/>\r
+         <td><xsl:value-of select="@message"/></td>\r
+         <td><xsl:value-of select="@line"/></td>\r
+       </tr>\r
+       </xsl:for-each>\r
+    </table>\r
+    <a href="#top">Back to top</a>\r
+       </xsl:template>\r
+       \r
+       \r
+       <xsl:template match="checkstyle" mode="summary">\r
+               <h3>Summary</h3>\r
+               <xsl:variable name="fileCount" select="count(file)"/>\r
+               <xsl:variable name="errorCount" select="count(file/error)"/>\r
+               <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">\r
+               <tr>\r
+                       <th>Files</th>\r
+                       <th>Errors</th>\r
+               </tr>\r
+               <tr>\r
+                 <xsl:call-template name="alternated-row"/>\r
+                       <td><xsl:value-of select="$fileCount"/></td>\r
+                       <td><xsl:value-of select="$errorCount"/></td>\r
+               </tr>\r
+               </table>\r
+       </xsl:template>\r
+       \r
+  <xsl:template name="alternated-row">\r
+    <xsl:attribute name="class">\r
+      <xsl:if test="position() mod 2 = 1">a</xsl:if>\r
+      <xsl:if test="position() mod 2 = 0">b</xsl:if>\r
+    </xsl:attribute>  \r
+  </xsl:template>      \r
+</xsl:stylesheet>\r
+\r
+\r