| career | drupal | java | mac | mysql | perl | scala | uml | unix  
</tr> </xsl:template> <xsl:template match="file"> <redirect:write file="{$output.dir}/files{substring-after(@name, $basedir)}.xml"> <document> <properties> <title>Checkstyle Audit </properties> <body> <section name="Details for {substring-after(@name, $basedir)}"> <table> <tr> <th>Error Description <th>Line </tr> <xsl:for-each select="error"> <tr> <xsl:call-template name="alternated-row"/> <td> <td> </tr> </xsl:for-each> </table> </section> </body> </document> </redirect:write> </xsl:template> <xsl:template match="checkstyle" mode="summary"> <section name="Summary"> <xsl:variable name="fileCount" select="count(file)"/> <xsl:variable name="errorCount" select="count(file/error)"/> <xsl:variable name="fileErrorCount" select="count(file[count(error) != 0])"/> <table> <tr> <th>Files <th>Files With Errors <th>Errors </tr> <tr> <xsl:call-template name="alternated-row"/> <td> <td> <td> </tr> </table> </section> </xsl:template> <xsl:template name="alternated-row"> <xsl:attribute name="class"> <xsl:if test="position() mod 2 = 1">oddrow <xsl:if test="position() mod 2 = 0">evenrow </xsl:attribute> </xsl:template> </xsl:stylesheet>

Other Ant examples (source code examples)

Here is a short list of links related to this Ant checkstyle-xdoc.xsl source code file:

Ant example source code file (checkstyle-xdoc.xsl)

This example Ant source code file (checkstyle-xdoc.xsl) is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Ant tags/keywords

apache, asf, asf, audit, license, license, of, see, see, software, unless, version, you, you

The checkstyle-xdoc.xsl source code

<xsl:stylesheet xmlns:xsl="" version="1.0"

   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   See the License for the specific language governing permissions and
   limitations under the License.

    <xsl:output method="xml" indent="yes"/>
    <xsl:decimal-format decimal-separator="." grouping-separator="," />

    <xsl:param name="output.dir" select="'.'"/>
    <xsl:param name="basedir" select="'.'"/>

    <xsl:template match="checkstyle">
          <title>Checkstyle Audit

          <xsl:apply-templates select="." mode="summary"/>
          <!-- File list part -->
          <xsl:apply-templates select="." mode="filelist"/>
          <xsl:apply-templates select="file[count(error) != 0]"/>

    <xsl:template match="checkstyle" mode="filelist">
      <section name="Files">
            <xsl:apply-templates select="file[count(error) != 0]" mode="filelist">
                <xsl:sort select="count(error)" order="descending" data-type="number"/>

    <xsl:template match="file" mode="filelist">
            <xsl:call-template name="alternated-row"/>
            <td nowrap="nowrap">
                    <xsl:attribute name="href">
                    <xsl:value-of select="substring-after(@name, $basedir)"/>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.