[jsword-svn] jsword-support/tools/javancss/javancss21.41/xslt s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Tue Aug 16 11:03:13 MST 2005


Update of /cvs/jsword/jsword-support/tools/javancss/javancss21.41/xslt
In directory www.crosswire.org:/tmp/cvs-serv29457/tools/javancss/javancss21.41/xslt

Added Files:
	javancss2html.xsl javancss_no_functions_overloading.xsl 
	javancss2document11.xsl javancss2text.xsl xmltest.xsl 
Log Message:
Upgrading jsword-support/tools

--- NEW FILE: javancss_no_functions_overloading.xsl ---
<?xml version="1.0"?>
<!--
Copyright (C) 2002 Chr. Clemens Lee <clemens at kclee.com>.

This file is part of JavaNCSS
(http://www.kclee.com/clemens/java/javancss/).

JavaNCSS is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.

JavaNCSS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with JavaNCSS; see the file COPYING.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<!--
This stylesheet converts JavaNCSS XML output to a document format
which is very similar to its input but has different names
for the functions tag so no overloading of that name takes place.

Chr. Clemens Lee
2002-08-04
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="/javancss/packages/package/functions">
    <pck_functions><xsl:value-of select="."/></pck_functions>
  </xsl:template>

  <xsl:template match="/javancss/packages/total/functions">
    <pck_total_functions><xsl:value-of select="."/></pck_total_functions>
  </xsl:template>

  <xsl:template match="/javancss/objects/object/functions">
    <obj_functions><xsl:value-of select="."/></obj_functions>
  </xsl:template>

  <xsl:template match="/javancss/objects/averages/functions">
    <obj_avg_functions><xsl:value-of select="."/></obj_avg_functions>
  </xsl:template>

  <xsl:template match="*">
    <xsl:copy>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>

--- NEW FILE: javancss2text.xsl ---
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="text"/>

  <xsl:template match="packages">
    <xsl:value-of select="Util:paddWithSpace(String:new('Nr.'),Math:max(string-length(count(package)),3))" xmlns:Util="xalan://ccl.util.Util" xmlns:String="xalan://java.lang.String" xmlns:Math="xalan://java.lang.Math"/>
    <xsl:text>   Classes Functions      NCSS  Javadocs Package
</xsl:text>

    <xsl:apply-templates select="package"/>

    <xsl:value-of select="Util:paddWithSpace(String:new('   '),Math:max(string-length(count(package)),3))" xmlns:Util="xalan://ccl.util.Util" xmlns:String="xalan://java.lang.String" xmlns:Math="xalan://java.lang.Math"/>
    <xsl:text> --------- --------- --------- ---------
</xsl:text>

    <xsl:value-of select="Util:paddWithSpace(String:new('   '),Math:max(string-length(count(package)),4))" xmlns:Util="xalan://ccl.util.Util" xmlns:String="xalan://java.lang.String" xmlns:Math="xalan://java.lang.Math"/>

    <xsl:value-of select="Util:paddWithSpace(total/classes,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(total/functions,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(total/ncss,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(total/javadocs,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> Total

</xsl:text>

    <xsl:apply-templates select="table"/>

    <xsl:text>
</xsl:text>


  </xsl:template>

  <xsl:template match="package">
    <xsl:value-of select="Util:paddWithSpace(String:new(position()),Math:max(string-length(count(../package)),3))" xmlns:Util="xalan://ccl.util.Util" xmlns:String="xalan://java.lang.String" xmlns:Math="xalan://java.lang.Math"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(classes,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(functions,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(ncss,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(javadocs,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="name"/>
    <xsl:text>
</xsl:text>
  </xsl:template>

  <xsl:template match="table">
    <xsl:apply-templates select="tr[position()=1]"/>
    <xsl:text>-------------------------------------------------------------
</xsl:text>
    <xsl:apply-templates select="tr[position()!=1]"/>
  </xsl:template>

  <xsl:template match="tr">
    <xsl:apply-templates select="td[position()!=6]"/>
    <xsl:text>| </xsl:text>
    <xsl:value-of select="td[position()=6]"/>
    <xsl:text>
</xsl:text>
  </xsl:template>

  <xsl:template match="td">
    <xsl:value-of select="Util:paddWithSpace(.,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
  </xsl:template>

  <xsl:template match="objects">
    <xsl:value-of select="Util:paddWithSpace(String:new('Nr.'),Math:max(string-length(count(object)),3))" xmlns:Util="xalan://ccl.util.Util" xmlns:String="xalan://java.lang.String" xmlns:Math="xalan://java.lang.Math"/>
    <xsl:text> NCSS Functions Classes Javadocs Class
</xsl:text>
    <xsl:apply-templates select="object"/>
    <xsl:text>Average Object NCSS:             </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(averages/ncss,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text>
Average Object Functions:        </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(averages/functions,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text>
Average Object Inner Classes:    </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(averages/classes,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text>
Average Object Javadoc Comments: </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(averages/javadocs,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text>
Program NCSS:                    </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(ncss,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text>

</xsl:text>
  </xsl:template>

  <xsl:template match="object">
    <xsl:value-of select="Util:paddWithSpace(String:new(position()),Math:max(string-length(count(../object)),3))" xmlns:Util="xalan://ccl.util.Util" xmlns:String="xalan://java.lang.String" xmlns:Math="xalan://java.lang.Math"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(ncss,4)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(functions,9)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(classes,7)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(javadocs,8)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="name"/>
    <xsl:text>
</xsl:text>    
  </xsl:template>

  <xsl:template match="functions">
    <xsl:value-of select="Util:paddWithSpace(String:new('Nr.'),Math:max(string-length(count(function)),3))" xmlns:Util="xalan://ccl.util.Util" xmlns:String="xalan://java.lang.String" xmlns:Math="xalan://java.lang.Math"/>
    <xsl:text> NCSS CCN JVDC Function
</xsl:text>
    <xsl:apply-templates select="function"/>
    <xsl:text>Average Function NCSS: </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(function_averages/ncss,10)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text>
Average Function CCN:  </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(function_averages/ccn,10)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text>
Average Function JVDC: </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(function_averages/javadocs,10)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text>
Program NCSS:          </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(ncss,10)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text>
</xsl:text>
  </xsl:template>

  <xsl:template match="function">
    <xsl:value-of select="Util:paddWithSpace(String:new(position()),Math:max(string-length(count(../function)),3))" xmlns:Util="xalan://ccl.util.Util" xmlns:String="xalan://java.lang.String" xmlns:Math="xalan://java.lang.Math"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(ncss,4)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(ccn,3)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="Util:paddWithSpace(javadocs,4)" xmlns:Util="xalan://ccl.util.Util"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="name"/>
    <xsl:text>
</xsl:text>    
  </xsl:template>

  <xsl:template match="text()"/>

</xsl:stylesheet>

--- NEW FILE: javancss2document11.xsl ---
<?xml version="1.0"?>
<!--
Copyright (C) 2002 Ross Gardler <ross at saafe.org>.

This file is part of JavaNCSS2Ant
(http://www.kclee.com/clemens/java/javancss/).

JavaNCSS is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.

JavaNCSS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with JavaNCSS; see the file COPYING.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<!--
This stylesheet converts JavaNCSS XML output to a document format
which is very close to HTML and which can be used to generate
custom HTML pages for your project.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="javancss">
    <document>
      <header>
        <title>Java Non Commenting Source Statements - Analysis</title>
      </header>
      <body>
        <xsl:call-template name="packages"/>
        <xsl:call-template name="classes"/>
        <xsl:call-template name="methods"/>
        <section title="Explanation">
          <p>The metrics on this page are calculated by counting the comment lines and Non Commenting Source Statements (NCSS). Statements are not statements as specified in the Java Language Specification but include all kinds of declarations too. Roughly spoken, NCSS is approximately equivalent to counting ';' and '{' characters in Java source files.</p>
          <p>SLCs and MLCs correspond to Sinle Line and Multi Line comments, whilst CCN is the Cyclomatic Complexity Number.</p>
          <p>For more information about these metrics see the <link href="http://www.kclee.com/clemens/java/javancss/">JavaNCSS</link> home page.</p>
        </section>
        <section title="credits">
          <p>Generated by <link href="http://www.kclee.com/clemens/java/javancss/">JavaNCSS</link>,<link href="http://sourceforge.net/projects/javancss2ant/">javaNCSS2Ant</link> and <link href="http://jakarta.apache.org/ant">Ant</link></p>
        </section>
      </body>
    </document>
  </xsl:template>

  <xsl:template name="packages">
    <section title="Packages">
      <table width="100%">
        <tr>
          <th width="25%">Name</th>
          <th width="15%">Classes</th>
          <th width="15%">Methods</th>
          <th width="15%">Methods/Class</th>
          <th width="15%">NCSS</th>
          <th width="15%">Comm/NCSS</th>
        </tr>
        <xsl:for-each select="packages/package">
          <xsl:sort select="functions" data-type="number"/>
          <xsl:variable name="classes">
            <xsl:value-of select="classes"/>
          </xsl:variable>
          <xsl:variable name="methods">
            <xsl:value-of select="functions"/>
          </xsl:variable>
          <xsl:variable name="ncss">
            <xsl:value-of select="ncss"/>
          </xsl:variable>
          <xsl:variable name="slc">
            <xsl:value-of select="single_comment_lines"/>
          </xsl:variable>
          <xsl:variable name="mlc">
            <xsl:value-of select="multi_comment_lines"/>
          </xsl:variable>
          <xsl:variable name="comments">
            <xsl:value-of select="$slc + $mlc"/>
          </xsl:variable>
          <tr>
            <td><xsl:value-of select="name"/></td>
            <td><xsl:value-of select="$classes"/></td>
            <td><xsl:value-of select="$methods"/></td>
            <td><xsl:value-of select="format-number($methods div $classes, '#.#')"/></td>
            <td><xsl:value-of select="$ncss"/></td>
            <td><xsl:value-of select="format-number($ncss div $comments, '#.#')"/></td>
          </tr>
        </xsl:for-each>
      </table>
    </section>
  </xsl:template>
  
  <xsl:template name="classes">
    <section title="Classes">
      <table width="100%">
        <tr>
          <th width="40%">Name</th>
          <th width="20%">Methods</th>
          <th width="20%">NCSS</th>
          <th width="20%">NCSS/Method</th>
        </tr>
        <xsl:for-each select="objects/object">
          <tr>
            <xsl:variable name="ncss">
              <xsl:value-of select="ncss"/>
            </xsl:variable>
            <xsl:variable name="methods">
              <xsl:value-of select="functions"/>
            </xsl:variable>
            <td><xsl:value-of select="name"/></td>
            <td><xsl:value-of select="$methods"/></td>
            <td><xsl:value-of select="$ncss"/></td>
            <td><xsl:value-of select="format-number($ncss div $methods, '#.#')"/></td>
          </tr>
        </xsl:for-each>
      </table>
    </section>    
  </xsl:template>

  <xsl:template name="methods">
    <section title="Methods">
      <table width="100%">
        <tr>
          <th width="40%">Name</th>
          <th width="20%">NCSS</th>
          <th width="20%">CCN</th>
          <th width="20%">NCSS/CCN</th>
        </tr>
        <xsl:for-each select="functions/function">
          <tr>
            <xsl:variable name="ncss">
              <xsl:value-of select="ncss"/>
            </xsl:variable>
            <xsl:variable name="ccn">
              <xsl:value-of select="ccn"/>
            </xsl:variable>
            <td><xsl:value-of select="name"/></td>
            <td><xsl:value-of select="$ncss"/></td>
            <td><xsl:value-of select="$ccn"/></td>
            <td><xsl:value-of select="format-number($ncss div $ccn, '#.#')"/></td>
          </tr>
        </xsl:for-each>
      </table>
    </section>
  </xsl:template>

</xsl:stylesheet>

--- NEW FILE: xmltest.xsl ---
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="text"/>

  <xsl:template match="/">
    <xsl:apply-templates select="javancss"/>
  </xsl:template>

  <xsl:template match="javancss">
	 <xsl:value-of select="ncss"/>
  </xsl:template>

  <xsl:template match="text()"/>

</xsl:stylesheet>

--- NEW FILE: javancss2html.xsl ---
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html"/>
  <xsl:template match="/">
    <html>
      <head>
        <title>JavaNCSS Analysis</title>
        <style type="text/css">
          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">JavaNCSS Analysis</a>
        </h1>
        <p align="right">Designed for use with <a href="http://www.kclee.com/clemens/java/javancss/">JavaNCSS</a> and <a href="http://jakarta.apache.org">Ant</a>.</p>
        <hr size="2"/>
        <xsl:apply-templates/>
      </body>
    </html>
  </xsl:template>
  <xsl:template match="packages">
    <h2>Packages</h2>
    <table class="details" border="0" width="100%">
      <tr>
        <th>Nr.</th>
        <th>Classes</th>
        <th>Functions</th>
        <th>NCSS</th>
        <th>Javadocs</th>
        <th>Package</th>
      </tr>
      <xsl:apply-templates select="package"/>
      <tr>
        <td>&#160;</td>
        <td>&#160;</td>
        <td>&#160;</td>
        <td>&#160;</td>
        <td>&#160;</td>
        <td>&#160;</td>
      </tr>
      <tr>
        <td>&#160;</td>
        <td><xsl:value-of select="total/classes"/></td>  
        <td><xsl:value-of select="total/functions"/></td>  
        <td><xsl:value-of select="total/ncss"/></td>  
        <td><xsl:value-of select="total/javadocs"/></td>
        <td>Total</td>  
      </tr>
    </table>
    <p/>
    <xsl:apply-templates select="table"/>
  </xsl:template>

  <xsl:template match="package">
    <tr>
      <td><xsl:value-of select="position()"/></td>
      <td><xsl:value-of select="classes"/></td>
      <td><xsl:value-of select="functions"/></td>
      <td><xsl:value-of select="ncss"/></td>
      <td><xsl:value-of select="javadocs"/></td>
      <td><xsl:value-of select="name"/></td>
    </tr>
  </xsl:template>

  <xsl:template match="table">
    <table class="details" border="0" width="100%">
      <xsl:apply-templates select="tr"/>
    </table>
    <p/>  
  </xsl:template>

  <xsl:template match="tr">
    <xsl:variable name="row"><xsl:value-of select="position()"/></xsl:variable>
    <tr>
      <xsl:apply-templates select="td">
        <xsl:with-param name="row"><xsl:value-of select="$row"/></xsl:with-param>
      </xsl:apply-templates>
    </tr>
  </xsl:template>

  <xsl:template match="td">
    <xsl:param name="row" select="3"/>
    <xsl:choose>
      <xsl:when test="$row='1'">
        <th>
          <xsl:if test="position()=6">
            <xsl:text>|</xsl:text>
          </xsl:if>
          <xsl:value-of select="."/>&#160;
        </th>
      </xsl:when>
      <xsl:otherwise>
        <td>
          <xsl:if test="position()=6">
            <xsl:text>| </xsl:text>
          </xsl:if>
          <xsl:value-of select="."/>&#160;
        </td>      
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template match="objects">
    <h2>Objects</h2>
    <table class="details" border="0" width="100%">
      <tr>
        <th>Nr.</th>
        <th>NCSS</th>
        <th>Functions</th>
        <th>Classes</th>
        <th>Javadocs</th>
        <th>Class</th>
      </tr>
      <xsl:apply-templates select="object"/>
      <tr>
        <td colspan="5">Average Object NCSS:</td>
        <td><xsl:value-of select="averages/ncss"/></td>
      </tr>
      <tr>
        <td colspan="5">Average Object Functions:</td>
        <td><xsl:value-of select="averages/functions"/></td>
      </tr>
      <tr>
        <td colspan="5">Average Object Inner Classes:</td>
        <td><xsl:value-of select="averages/classes"/></td>
      </tr>
      <tr>
        <td colspan="5">Average Object Javadoc Comments:</td>
        <td><xsl:value-of select="averages/javadocs"/></td>
      </tr>
      <tr>
        <td colspan="5">Program NCSS:</td>
        <td><xsl:value-of select="ncss"/></td>
      </tr>
    </table>
    <p/>  
  </xsl:template>

  <xsl:template match="object">
    <tr>
      <td><xsl:value-of select="position()"/></td>
      <td><xsl:value-of select="ncss"/></td>
      <td><xsl:value-of select="functions"/></td>
      <td><xsl:value-of select="classes"/></td>
      <td><xsl:value-of select="javadocs"/></td>
      <td><xsl:value-of select="name"/></td>
    </tr>
  </xsl:template>

  <xsl:template match="functions">
    <h2>Functions</h2>
    <table class="details" border="0" width="100%">
      <tr>
        <th>Nr.</th>
        <th>NCSS</th>
        <th>CCN</th>
        <th>Javadoc</th>
        <th>Function</th>
      </tr>
      <xsl:apply-templates select="function"/>
      <tr>
        <td colspan="4">Average Function NCSS:</td>
        <td><xsl:value-of select="function_averages/ncss"/></td>
      </tr>
      <tr>
        <td colspan="4">Average Function CCN:</td>
        <td><xsl:value-of select="function_averages/ccn"/></td>
      </tr>
      <tr>
        <td colspan="4">Average Function Javadocs:</td>
        <td><xsl:value-of select="function_averages/javadocs"/></td>
      </tr>
      <tr>
        <td colspan="4">Program NCSS:</td>
        <td><xsl:value-of select="ncss"/></td>
      </tr>
    </table>
    <p/>
  </xsl:template>

  <xsl:template match="function">
    <xsl:variable name="ccn-color">
      <xsl:choose>
        <xsl:when test="ccn &gt; '9'">#ff0000</xsl:when>
        <xsl:otherwise>#000000</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="jdocs-color">
      <xsl:choose>
        <xsl:when test="javadocs &lt; '1'">#ff0000</xsl:when>
        <xsl:otherwise>#000000</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <tr>
      <td><xsl:value-of select="position()"/></td>
      <td><xsl:value-of select="ncss"/></td>
      <td><font color="{$ccn-color}"><xsl:value-of select="ccn"/></font></td>
      <td><font color="{$jdocs-color}"><xsl:value-of select="javadocs"/></font></td>
      <td><xsl:value-of select="name"/></td>
    </tr>
  </xsl:template>

  <xsl:template match="text()"/>

</xsl:stylesheet>



More information about the jsword-svn mailing list