jvanzyl     02/03/11 12:20:38

  Added:       src/dvsl/xdocs dependencies.dvsl developer-list.dvsl
                        index.dvsl jdepend.dvsl junit.dvsl mail-lists.dvsl
                        pdf.dvsl site.dvsl
  Log:
  All the dvsl that must be part of the generated build:
  
  gump/
    dvsl to make a gump descriptor
  
  xdocs/
    dvsl used to transform the xml into the site
  
  Revision  Changes    Path
  1.1                  jakarta-turbine-maven/src/dvsl/xdocs/dependencies.dvsl
  
  Index: dependencies.dvsl
  ===================================================================
  <!--
  
    dependency page generator
  
    version : $Id: dependencies.dvsl,v 1.1 2002/03/11 20:20:38 jvanzyl Exp $
  -->
  
  #match ("dependencies")
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>Dependencies</title>
    </properties>
  
    <body>
      <section name="Dependencies">
        <p>
          These are the dependencies required by the project :
        </p>
        <table>
          <tr>
            <th>Name</th>
            <th>Type</th>
            <th>Version</th>
            <th>JAR</th>
          </tr>
  $context.applyTemplates()
        </table>
      </section>
    </body>
  </document>
  #end
  
  #match ("dependency")
          <tr>
            <td>$node.name.value()</td>
            <td>$node.type.value()</td>
            <td>$node.version.value()</td>
            <td>$node.jar.value()</td>
          </tr>
  #end
  
  
  
  1.1                  jakarta-turbine-maven/src/dvsl/xdocs/developer-list.dvsl
  
  Index: developer-list.dvsl
  ===================================================================
  <!--
  
    developer list page generator
  
    version : $Id: developer-list.dvsl,v 1.1 2002/03/11 20:20:38 jvanzyl Exp $
  -->
  
  #match ("developers")
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>Developers</title>
    </properties>
  
    <body>
      <section name="Developers">
        <p>
          Here are the developers on the project:
        </p>
        <table>
          <tr>
            <th>Name</th>
            <th>Email</th>
            <th>Organization</th>
          </tr>
  $context.applyTemplates()
        </table>
      </section>
    </body>
  </document>
  #end
  
  #match ("developer")
          <tr>
            <td>$node.name.value()</td>
            <td><a href="mailto:$node.email.value()">$node.email.value()</a></td>
            <td>$node.organization.value()</td>
          </tr>
  #end
  
  
  
  1.1                  jakarta-turbine-maven/src/dvsl/xdocs/index.dvsl
  
  Index: index.dvsl
  ===================================================================
  <!--
  
    front page generator
  
    version : $Id: index.dvsl,v 1.1 2002/03/11 20:20:38 jvanzyl Exp $
  -->
  
  #match ("project")
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>$node.valueOf('id')</title>
    </properties>
  
    <body>
      <section name="$node.valueOf('id')">
        <p>
          $node.copy($node.get('description').children())
        </p>
      </section>
    </body>
  </document>
  #end
  
  
  
  1.1                  jakarta-turbine-maven/src/dvsl/xdocs/jdepend.dvsl
  
  Index: jdepend.dvsl
  ===================================================================
  #######################################################################
  ## J D E P E N D    D V S L    S T Y L E S H E E T                   ##
  #######################################################################
  
  ## This stylesheet is used to transform the output of JDepend's xml
  ## generator.  The XML is transformed into a standard xdoc that can
  ## then be transformed (yet again) using whatever stylesheet is used
  ## to format one's site.
  ##
  ## Based on the XSL stylesheet jdepend.xsl from Ant.
  ##
  ## Version: $Id: jdepend.dvsl,v 1.1 2002/03/11 20:20:38 jvanzyl Exp $
  
  #######################################################################
  ## V E L O C I T Y    M A C R O S                                    ##
  #######################################################################
  
  ## Prints a standard navbar for navigation.
  ##
  #macro (navbar)
        <p>
          [<a href="#Summary">summary</a>]
          [<a href="#Packages">packages</a>]
          [<a href="#Cycles">cycles</a>]
          [<a href="#Explanations">explanations</a>]
        </p>
  #end
  
  ## Used to print the abstract and concrete classes that a package
  ## contains.  Also removes the leading package information from 
  ## the fully qualified class (to conserve screen space).  Also, 
  ## creates a link to the xref sources so users can quickly navigate
  ## the code.
  ##
  #macro (classes $currentNode $xpath)
      #if (! $currentNode.get($xpath))
          <i>None</i>
      #end
      #foreach ($class in $currentNode.selectNodes($xpath))
          #set ($index = $class.value().lastIndexOf('.'))
          #set ($index = $index + 1)
          #set ($dir = $context.toolbox.strings.replace($class.value(), ".", "/"))
          <a href="xref/${dir}.html">$class.value().substring($index)</a><br/>
      #end
  #end
  
  ## Used to print the "used" and "used by" packages.  Also, creates a
  ## link to the appropriate package in the report.  
  ##
  #macro (packages $currentNode $xpath)
      #if (! $currentNode.get($xpath))
          <i>None</i>
      #end
      #foreach ($class in $currentNode.selectNodes($xpath))
          <a href="#${class.value()}">$class.value()</a><br/>
      #end
  #end
  
  ## Convert a string that represents a number using the specified
  ## pattern.  
  ##
  #macro (formatAsNumber $string $pattern)
      #set ($value = $context.toolbox.numbers.createNumber($string))
      $context.toolbox.formatter.formatNumber($value, $pattern)
  #end
  
  #######################################################################
  ## T E M P L A T E    D E F I N I T I O N S                          ## 
  ####################################################################### 
  
  ## Matches the root element of the JDepend XML report.
  ##
  #match ("JDepend")
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>JDepend Source Code Analysis</title>
    </properties>
  
    <body>
      ###################################################################
      <section name="Metric Results">
        #navbar ()
        <p>
          The following document contains the results of a <a
          href="http://www.clarkware.com/software/JDepend.html";>JDepend</a>
          metric analysis.  The various metrics are defined at the bottom
          of this document.
        </p>
      </section>
  
      ###################################################################
      <section name="Summary">
        #navbar ()
        <table>
          <tr>
            <th>Package</th>
            <th><font size="-1">Total<br/>Classes</font></th>
            <th><font size="-1">Abstract<br/>Classes</font></th>
            <th><font size="-1">Concrete<br/>Classes</font></th>
            <th><font size="-1">Afferent<br/>Couplings</font></th>
            <th><font size="-1">Efferent<br/>Couplings</font></th>
            <th><font size="-1">Abstractness</font></th>
            <th><font size="-1">Instability</font></th>
            <th><font size="-1">Distance</font></th>
          </tr>
  
        #foreach ($package in $node.selectNodes("./Packages/Package"))
            #if (! $package.get("error"))
          <tr>
            <td>
              <a href="#$package.attribute("name")">$package.attribute("name")</a>
            </td>
            <td align="right">$package.valueOf("Stats/TotalClasses")</td>
            <td>$package.valueOf("Stats/AbstractClasses")</td>
            <td>$package.valueOf("Stats/ConcreteClasses")</td>
            <td>$package.valueOf("Stats/Ca")</td>
            <td>$package.valueOf("Stats/Ce")</td>
            <td>#formatAsNumber ($package.valueOf("Stats/A") "0%")</td>
            <td>#formatAsNumber ($package.valueOf("Stats/I") "0%")</td>
            <td>#formatAsNumber ($package.valueOf("Stats/D") "0%")</td>
          </tr>
            #end
        #end
  
        #foreach ($package in $node.selectNodes("./Packages/Package"))
            #if ($package.get("error"))
          <tr>
            <td colspan="1">$package.attribute("name")</td>
            <td colspan="8">$package.valueOf("error")</td>
          </tr>
            #end
        #end
        </table>
      </section>
  
      ###################################################################
      <section name="Packages">
        #navbar ()
  
        #foreach ($package in $node.selectNodes("./Packages/Package"))
            #if (! $package.get("error"))
          <subsection name="${package.attribute('name')}">
            #navbar ()
            <table>
              <tr>
                <th>Afferent Couplings</th>
                <th>Efferent Couplings</th>
                <th>Abstractness</th>
                <th>Instability</th>
                <th>Distance</th>
              </tr>
              <tr>
                <td>$package.valueOf("Stats/Ca")</td>
                <td>$package.valueOf("Stats/Ce")</td>
                <td>#formatAsNumber ($package.valueOf("Stats/A") "0%")</td>
                <td>#formatAsNumber ($package.valueOf("Stats/I") "0%")</td>
                <td>#formatAsNumber ($package.valueOf("Stats/D") "0%")</td>
              </tr>
            </table>
  
            <table>
              <tr>
                <th>Abstract Classes</th>
                <th>Concrete Classes</th>
                <th>Used by Packages</th>
                <th>Uses Packages</th>
              </tr>
              <tr>
                <td>#classes ($package "AbstractClasses/Class")</td>
                <td>#classes ($package "ConcreteClasses/Class")</td>
                <td>#packages ($package "UsedBy/Package")</td>
                <td>#packages ($package "DependsUpon/Package")</td>
              </tr>
            </table>
          </subsection>
            #end
        #end
      </section>
  
      ###################################################################
      <section name="Cycles">
        #navbar ()
  
        #if (! $node.get("Cycles/Package"))
          <p>There are no cyclic dependancies.</p>
  
        #else
          <table>
            <tr>
              <th>Package</th>
              <th>Cyclic Dependencies</th>
            </tr>
            
            #foreach ($cycle in $node.selectNodes("./Cycles/Package"))
            <tr> 
              <td>$cycle.attribute('Name')</td>
              <td>
              #foreach ($package in $cycle.selectNodes("Package"))
                $package.value()<br/>
              #end
              </td>
            </tr>
            #end
  
          </table>
        #end
      </section>
  
      ###################################################################
      <section name="Explanations">
        #navbar ()
  
        <p>
          The following explanations are for quick reference and are
          lifted directly from the original <a
          href="http://www.clarkware.com/software/JDepend.html";>JDepend
          documentation</a>.
        </p>
        
        <table>
          <tr>
            <th>Term</th>
            <th>Description</th>
          </tr>
          <tr>
            <td>Number of Classes</td>
            <td>
              The number of concrete and abstract classes (and interfaces)
              in the package is an indicator of the extensibility of the
              package.
            </td>
          </tr>
          <tr>
            <td>Afferent Couplings</td>
            <td>
              The number of other packages that depend upon classes within
              the package is an indicator of the package's responsibility.
            </td>
          </tr>
          <tr>
            <td>Efferent Couplings</td>
            <td>
              The number of other packages that the classes in the package
              depend upon is an indicator of the package's independence.
            </td>
          </tr>
          <tr>
            <td>Abstractness</td> 
            <td>
              The ratio of the number of abstract classes (and interfaces)
              in the analyzed package to the total number of classes in
              the analyzed package.  The range for this metric is 0 to 1,
              with A=0 indicating a completely concrete package and A=1
              indicating a completely abstract package.
            </td>
          </tr>
          <tr>
            <td>Instability</td>
            <td>
              The ratio of efferent coupling (Ce) to total coupling (Ce /
              (Ce + Ca)). This metric is an indicator of the package's
              resilience to change.  The range for this metric is 0 to 1,
              with I=0 indicating a completely stable package and I=1
              indicating a completely instable package.
            </td>
          </tr>
          <tr>
            <td>Distance</td>
            <td>
              The perpendicular distance of a package from the idealized
              line A + I = 1. This metric is an indicator of the package's
              balance between abstractness and stability.  A package
              squarely on the main sequence is optimally balanced with
              respect to its abstractness and stability. Ideal packages
              are either completely abstract and stable (x=0, y=1) or
              completely concrete and instable (x=1, y=0).  The range for
              this metric is 0 to 1, with D=0 indicating a package that is
              coincident with the main sequence and D=1 indicating a
              package that is as far from the main sequence as possible. 
            </td>
          </tr>
          <tr>
            <td>Cycles</td>
            <td>
              Packages participating in a package dependency cycle are in
              a deadly embrace with respect to reusability and their
              release cycle. Package dependency cycles can be easily
              identified by reviewing the textual reports of dependency
              cycles. Once these dependency cycles have been identified
              with JDepend, they can be broken by employing various
              object-oriented techniques.
            </td>
          </tr>
        </table>
      </section>
  
    </body>
  </document>
  #end
  
  
  
  
  1.1                  jakarta-turbine-maven/src/dvsl/xdocs/junit.dvsl
  
  Index: junit.dvsl
  ===================================================================
  #######################################################################
  ## J U N I T     D V S L     S T Y L E S H E E T                     ##
  #######################################################################
  
  ## This stylesheet is used to transform the output of JUnit's xml
  ## generator.  The XML is transformed into a standard xdoc that can
  ## then be transformed (yet again) using whatever stylesheet is used
  ## to format one's site.
  ##
  ## Based on the XSL stylesheet junit-noframes.xsl from Ant.
  ##
  ## Version: $Id: junit.dvsl,v 1.1 2002/03/11 20:20:38 jvanzyl Exp $
  
  #######################################################################
  ## G L O B A L    V A R I A B L E S                                  ##
  #######################################################################
  
  ## Used to facilitate quoting in the template.
  ##
  #set ($quote = '"')
  
  #######################################################################
  ## V E L O C I T Y    M A C R O S                                    ##
  #######################################################################
  
  ## Convert a string that represents a number using the specified
  ## pattern.  
  ##
  #macro (formatAsNumber $string $pattern)
      #set ($value = $context.toolbox.numbers.createNumber($string))
      $context.toolbox.formatter.formatNumber($value, $pattern)
  #end
  
  ## Prints a standard navbar for navigation.
  ##
  #macro (navbar)
        <p>
          [<a href="#Summary">summary</a>]
          [<a href="#Package List">package list</a>]
          [<a href="#Test Cases">test cases</a>]
        </p>
  #end
  
  ## Prints a standard header for a test suite.
  ##
  #macro (testSuiteHeader)
      <tr>
        <th>Name</th>
        <th>Tests</th>
        <th>Errors</th>
        <th>Failures</th>
        <th>Time(s)</th>
      </tr>
  #end
  
  ## Prints a standard header for a test case.
  ##
  #macro (testCaseHeader)
      <tr>
        <th>Name</th>
        <th>Status</th>
        <th>Type</th>
        <th>Time(s)</th>
      </tr>
  #end
  
  ## Prints the message from a failure.
  ##
  #macro (displayFailure $current)
      #if ($current.attribute("message"))
        $toolbox.htmlescape.getText($current.attribute("message"))
      #else
        N/A
      #end
      <p/>
      <code>
        $toolbox.htmlescape.getText($current.value())
      </code>
  #end
  
  #######################################################################
  ## T E M P L A T E    D E F I N I T I O N S                          ## 
  ####################################################################### 
  
  ## Matches the root element of the JUnit XML report.
  ##
  #match ("testsuites")
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>JUnit Test Results</title>
    </properties>
  
    <body>
      ###################################################################
      <section name="Unit Test Results">
        #navbar ()
        <p>
          The following document contains the results of the <a
          href="http://www.junit.org";>JUnit</a> tests.  
        </p>
      </section>
  
      ###################################################################
      <section name="Summary">
        #navbar ()
        #set ($testCount    = $node.valueOf("sum(testsuite/@tests)"))
        #set ($errorCount   = $node.valueOf("sum(testsuite/@errors)"))
        #set ($failureCount = $node.valueOf("sum(testsuite/@failures)"))
        #set ($timeCount    = $node.valueOf("sum(testsuite/@time)"))
        #set ($successRate  = $node.valueOf("($testCount - $failureCount - 
$errorCount) div $testCount"))
        <table>
          <tr>
            <th>Tests</th>
            <th>Failures</th>
            <th>Errors</th>
            <th>Success rate</th>
            <th>Time(s)</th>
          </tr>
          <tr>
            <td>#formatAsNumber ($testCount    "0")</td>
            <td>#formatAsNumber ($failureCount "0")</td>
            <td>#formatAsNumber ($errorCount   "0")</td>
            <td>#formatAsNumber ($successRate  "0.00%")</td>
            <td>#formatAsNumber ($timeCount    "0.000")</td>
          </tr>
        </table>
        <p>
          Note: <i>failures</i> are anticipated and checked for with
          assertions while <i>errors</i> are unanticipated.
        </p>
      </section>
  
      ###################################################################
      <section name="Package List">
        #navbar ()
        <table>
            #testSuiteHeader ()
            #foreach ($testsuite in $node.selectNodes("./testsuite[not(./@package = 
preceding-sibling::testsuite/@package)]"))
            #set ($package = $testsuite.attribute('package'))
            #set ($quotedPackage = "$quote$package$quote")
            #set ($testCount     = $node.valueOf("sum(./testsuite[./@package = 
$quotedPackage]/@tests)"))
            #set ($errorCount    = $node.valueOf("sum(./testsuite[./@package = 
$quotedPackage]/@errors)"))
            #set ($failureCount  = $node.valueOf("sum(./testsuite[./@package = 
$quotedPackage]/@failures)"))
            #set ($timeCount     = $node.valueOf("sum(./testsuite[./@package = 
$quotedPackage]/@time)"))
          <tr>
            <td><a href="#$package">$package</a></td>
            <td>#formatAsNumber ($testCount    "0")</td>
            <td>#formatAsNumber ($failureCount "0")</td>
            <td>#formatAsNumber ($errorCount   "0")</td>
            <td>#formatAsNumber ($timeCount    "0.000")</td>
          </tr>
            #end
        </table>
        <p>
          Note: package statistics are not computed recursively, they only
          sum up all of its testsuites numbers.
        </p>
    
        #foreach ($testsuite in $node.selectNodes("./testsuite[not(./@package = 
preceding-sibling::testsuite/@package)]"))
        #set ($package = "$testsuite.attribute('package')")
        #set ($quotedPackage = "$quote$package$quote")
        <subsection name="$package">
          #navbar ()
          <table>
            #testSuiteHeader ()
            #foreach ($test in $node.selectNodes("/testsuites/testsuite[./@package = 
$quotedPackage]"))
            <tr>
              <td><a href="#$test.attribute('name')">$test.attribute('name')</a></td>
              <td>#formatAsNumber ($test.attribute('tests')    "0")</td>
              <td>#formatAsNumber ($test.attribute('errors')   "0")</td>
              <td>#formatAsNumber ($test.attribute('failures') "0")</td>
              <td>#formatAsNumber ($test.attribute('time')     "0.000")</td>
            </tr>
            #end
          </table>
        </subsection>
        #end
      </section>
  
      ###################################################################
      <section name="Test Cases">       
        #navbar ()
        #foreach ($testsuite in $node.selectNodes("./testsuite"))
        <subsection name="$testsuite.attribute('name')">
          #navbar ()
          <table>
            #testCaseHeader ()
  
            ## test can even not be started at all (failure to load the class)
            ## so report the error directly
            ##
            #foreach ($error in $testsuite.selectNodes("./error"))
            <tr> <td colspan="4"> #displayFailure ($error) </td> </tr>
            #end
  
            #foreach ($testcase in $testsuite.selectNodes("./testcase"))
            <tr>
              <td>$testcase.attribute("name")</td>
              #if ($testcase.get("failure"))
              <td>Failure</td>
              <td> #displayFailure ($testcase.selectSingleNode("failure")) </td>
              #elseif ($testcase.get("error"))
              <td>Error</td>
              <td> #displayFailure ($testcase.selectSingleNode("error")) </td>
              #else
              <td>Success</td>
              <td></td>
              #end
              <td>#formatAsNumber ($testcase.attribute("time") "0.000")</td>
            </tr>
            #end
          </table>
        </subsection>
        #end
      </section>
    </body>
  </document>
  #end
  
  
  
  1.1                  jakarta-turbine-maven/src/dvsl/xdocs/mail-lists.dvsl
  
  Index: mail-lists.dvsl
  ===================================================================
  <!--
  
    mail list page generator
  
    version : $Id: mail-lists.dvsl,v 1.1 2002/03/11 20:20:38 jvanzyl Exp $
  -->
  
  #match ("mailingLists")
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>Mailing Lists</title>
    </properties>
  
    <body>
      <section name="Mailing Lists">
        <p>
          Here are the email lists for the project:
        </p>
        <table>
          <tr>
            <th>List Name</th>
            <th>Subscribe</th>
            <th>Unsubscribe</th>
            <th>Archive</th>
          </tr>
  $context.applyTemplates()
        </table>
      </section>
    </body>
  </document>
  #end
  
  #match ("mailingList")
          <tr>
            <td>$node.name.value()</td>
            <td><a href="mailto:$node.subscribe.value()">Subscribe</a></td>
            <td><a href="mailto:$node.unsubscribe.value()">Unsubscribe</a></td>
            <td><a href="$node.archive.value()">Archive</a></td>
          </tr>
  #end
  
  
  
  1.1                  jakarta-turbine-maven/src/dvsl/xdocs/pdf.dvsl
  
  Index: pdf.dvsl
  ===================================================================
  #document()
  
  <!-- Make a Section header bar --> 
  #match ( makeSectionHeader $value )
    #if ( $value.getAttributeValue("name") )
      #set ( $titleName = $value.getAttributeValue("name") )
    #else
      #set ( $titleName = "" )  
    #end
    <fo:block 
      font-size="14pt" 
      font-family="sans-serif" 
      line-height="24pt"
      space-after.optimum="15pt"
      background-color="blue"
      color="white"
      text-align="start"
      padding-top="3pt">
      $titleName 
    </fo:block> 
  #end
  
  <!-- Make a Paragraph --> 
  #match ( makeParagraph $value )
   <fo:block 
     font-size="12pt"
     space-after.optimum="15pt" 
     font-family="sans-serif"
     background-color="white"
     color="black"
     text-align="start"
     padding-top="3pt">
     $xmlout.outputString($value) 
   </fo:block>
  #end
  
  <!-- Make a Source Code block -->
  #match ( makeSrc $value )
   <fo:block 
     font-size="12pt"
     space-after.optimum="15pt" 
     font-family="sans-serif"
     background-color="white"
     color="gray"
     text-align="start"
     padding-top="3pt">
     $escape.getText($value.getText()) 
   </fo:block>  
  #end
  
  <!-- Make an image link -->
  #match ( makeLink $value )
   <fo:block font-size="12pt"
     space-after.optimum="15pt" 
     font-family="sans-serif"
     background-color="white"
     color="gray"
     text-align="start"
     padding-top="3pt">
     <fo:basic-link external-destination="http://test";>
        TO DO
     </fo:basic-link>
   </fo:block>
  #end
  
  #match (document)
  <?xml version="1.0" encoding="utf-8"?>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
      <!-- defines the layout master -->
      <fo:layout-master-set>
        <fo:simple-page-master
           master-name="Velocity" 
          page-height="8.5in" 
          page-width="11in" 
          margin-top="0.25in" 
          margin-bottom="0.25in" 
          margin-left="0.5in" 
          margin-right="0.5in">
          <fo:region-before extent="0.25in"/>   
          <fo:region-body margin-top="0.25in"/>  
          </fo:simple-page-master>
        </fo:layout-master-set>
  
        <!-- starts actual layout -->
        <fo:page-sequence master-name="Velocity">
  
          <!-- header -->
          <fo:static-content flow-name="xsl-region-before">
            <fo:block 
               text-align="end" 
               font-size="10pt" 
               font-family="serif" 
               color="black"
               padding-right="3pt">
               $root.getChild("properties").getChild("title").getText()  pg 
<fo:page-number/>
            </fo:block>
          </fo:static-content>
                  
          <fo:flow flow-name="xsl-region-body">
          
          #set ($allSections = $xpath.applyTo("body/section", $root))
  
          <!-- Walk through the sections -->
          #foreach ( $section in $allSections )
             #makeSectionHeader($section)
            #foreach ( $item in $section.getChildren() )     
              #if ( $item.getName().equals("p") )
                #makeParagraph($item)
              #elseif ( $item.getName().equals("source") )
                #makeSrc($item)
              #end
            #end
          #end
         </fo:flow>
     </fo:page-sequence>
   </fo:root>                      
  #end
  
  
  
  
  
  
  
  
  
  
  1.1                  jakarta-turbine-maven/src/dvsl/xdocs/site.dvsl
  
  Index: site.dvsl
  ===================================================================
  #set( $relative-path = "." )
  
  #set( $body-bg = '#ffffff' )
  #set( $body-fg = '#000000' )
  #set( $body-link = '#525D76' )
  #set( $banner-bg = '#525D76')
  #set( $banner-fg = '#ffffff')
  #set( $sub-banner-bg = '#828DA6')
  #set( $sub-banner-fg = '#ffffff')
  #set( $table-th-bg = '#039acc')
  #set( $table-td-bg = '#a0ddf0')
  #set( $source-color = '#023264')
  
  #match( "document" )
  
    #set( $project = $node.selectSingleNode("document('xdocs/project.xml')/project" ) )
  
    <html>
      <head>
        <title>$project.title - $node.properties.title</title>
  
        #foreach( $n in $node.properties.selectNodes("author") )
          <meta name="author" value="$n"/>
          <meta name="email" value="$n.attribute("email")" />
        #end
  
      </head>
  
      <body 
        bgcolor="$body-bg" 
        text="$body-fg" 
        link="$body-link"
        alink="$body-link" 
        vlink="$body-link">
  
        <table border="0" width="100%" cellspacing="4">
  
        ## PAGE HEADER
        <tr><td colspan="2">
  
          ## JAKARTA LOGO
          <a href="http://jakarta.apache.org/";>
            <img src="http://jakarta.apache.org/images/jakarta-logo.gif";
               align="left" alt="The Jakarta Project" border="0"/>
          </a>
  
          #if( $project.logo )
  
            #set( $alt = $project.logo )
            #set( $home = $project.attribute("href") )
            #set( $src = $project.logo.attribute( "href" ) )
  
            ## PROJECT LOGO
            <a href="$home">
            #if ( $src.startsWith("http") )
              <img src="$src" align="right" alt="$alt" border="0"/>
            #else
              <img src="${relative-path}$src" align="right" alt="$alt" border="0"/>
            #end
            </a>
          #end
  
        </td></tr>
  
        ## HEADER SEPARATOR
        <tr>
          <td colspan="2">
            <hr noshade="" size="1"/>
          </td>
        </tr>
  
        <tr>
  
          ## LEFT SIDE NAVIGATION
          <td width="20%" valign="top" nowrap="true">
            $context.applyTemplates( $project, "body/menu" )
          </td>
  
          <!-- RIGHT SIDE MAIN BODY -->
          <td width="80%" valign="top" align="left">
            $context.applyTemplates("body/section")
            $context.applyTemplates("body/glossary")
            $context.applyTemplates("body/changelog")
          </td>
  
        </tr>
  
        <!-- FOOTER SEPARATOR -->
        <tr>
          <td colspan="2">
            <hr noshade="" size="1"/>
          </td>
        </tr>
  
        <!-- PAGE FOOTER -->
        <tr><td colspan="2">
          <div align="center"><font color="$body-link" size="-1"><em>
          Copyright &#169; 1999-2001, Apache Software Foundation
          </em></font></div>
        </td></tr>
  
      </table>
      </body>
      </html>
  #end
  
  
  #*
   *   Process a menu for the navigation bar
   *#
  #match( "menu" )
      <p>
        <strong>$attrib.name</strong>
      </p>
      <ul>
          $context.applyTemplates("item")
      </ul>
  #end
  
  #*
   *   Process a menu item for the navigation bar
   *#
  #match( "item" )
  
      #if( $attrib.href.startsWith("http") )
          <li><a href="$attrib.href">$attrib.name</a></li>
      #else
          <li><a href="${relative-path}$attrib.href">$attrib.name</a></li>
      #end
  #end
  
  
  #*
   *  process a documentation section
   *#
  #match( "section" )
  
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
  
        <tr><td bgcolor="$banner-bg">
            <font color="$banner-fg" face="arial,helvetica.sanserif">
            <a name="$attrib.name">
            <strong>$attrib.name</strong></a></font>
        </td></tr>
  
        <tr><td><blockquote>
          $context.applyTemplates("*")
        </blockquote></td></tr>
        <tr><td>&nbsp;</td></tr>
      </table>
  #end
  
  #match( "subsection" )
  
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <!-- Subsection heading -->
        <tr><td bgcolor="$sub-banner-bg">
            <font color="$sub-banner-fg" face="arial,helvetica.sanserif">
            <a name="$attrib.name">
            <strong>$attrib.name</strong></a></font>
        </td></tr>
        <!-- Subsection body -->
        <tr><td><blockquote>
          $context.applyTemplates("*")
        </blockquote></td></tr>
        <tr><td>&nbsp;</td></tr>
      </table>
  
  #end
  
  #match( "source" )
  
      <div align="left">
        <table cellspacing="4" cellpadding="0" border="0">
          <tr>
            <td bgcolor="$source-color" width="1" height="1"><img 
src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
            <td bgcolor="$source-color" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
            <td bgcolor="$source-color" width="1" height="1"><img 
src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
          </tr>
          <tr>
            <td bgcolor="$source-color" width="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
            <td bgcolor="#ffffff" height="1">
            <pre>$toolbox.htmlescape.getText( $node.value() )</pre>
            </td>
            <td bgcolor="$source-color" width="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
          </tr>
          <tr>
            <td bgcolor="$source-color" width="1" height="1"><img 
src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
            <td bgcolor="$source-color" height="1"><img src="/images/void.gif" 
width="1" height="1" vspace="0" hspace="0" border="0"/></td>
            <td bgcolor="$source-color" width="1" height="1"><img 
src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
          </tr>
        </table>
      </div>
  #end
  
  
  
  #match("table")
  <table>
  $context.applyTemplates("*")
  </table>
  #end
  
  #match("tr")
  <tr>
  $context.applyTemplates("*")
  </tr>
  #end
  
  #match( "td" )
  
  #set ($colspan = $attrib.colspan)
  #set ($rowspan = $attrib.rowspan)
  
  <td 
    bgcolor="$table-td-bg" 
    colspan="$!colspan" 
    rowspan="$!rowspan" 
    valign="top" 
    align="left">
    
    <font 
      color="#000000" 
      size="-1" 
      face="arial,helvetica,sanserif">
      
      $node.copy( $node.children() )
    </font>
  </td>
  #end
  
  #match( "th" )
  
  #set ($colspan = $attrib.colspan )
  #set ($rowspan = $attrib.rowspan )
  
  <td 
    bgcolor="$table-th-bg" 
    colspan="$!colspan" 
    rowspan="$!rowspan" 
    valign="top" 
    align="left">
    
    <font 
      color="#000000" 
      size="-1" 
      face="arial,helvetica,sanserif">
      
      $node.copy( $node.children())
    </font>
  </td>
  #end
  
  ## -----------------------------------------------------
  ## G L O S S A R Y
  ## -----------------------------------------------------
  
  #match ( "glossary" )
    $context.applyTemplates("glossary-entries/glossary-entry")
  #end
  
  #*
  #match ("glossary-entry")
    <b>$context.node.name</b>
    <br/>
    $context.node.definition
    <p/>
  #end
  *#
  
  ## -----------------------------------------------------
  ## C H A N G E  L O G
  ## -----------------------------------------------------
  
  #match("changelog")
  
  <table>
  <tr>
    <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" 
align="left">
      Date</th>
    <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" 
align="left">
      Author</th>
    <th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" 
align="left">
      Files / Message</th>
  </tr>
  $context.applyTemplates("changelog-entry")
  </table>
  
  #end
  
  #match( "changelog-entry" )
  <tr>
    <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" 
align="left">
      $node.date.value()</td>
    <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" 
align="left">
      $node.author.value()</td>
    <td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top" 
align="left">
      $context.applyTemplates("file")
      <br/>
      $node.msg.value()</td>
  </tr>
  #end
  
  #match("file")
  $node.name.value()
  <br/>
  #end
  
  
  ## -----------------------------------------------------
  ## D E F A U L T  C O P Y
  ## -----------------------------------------------------
  
  #match("*")
  $node.copy()
  #end
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to