]> source.dussan.org Git - poi.git/commitdiff
Added stylesheet to show the ant build file targets.
authorNicola Ken Barozzi <nicolaken@apache.org>
Sun, 28 Apr 2002 21:11:34 +0000 (21:11 +0000)
committerNicola Ken Barozzi <nicolaken@apache.org>
Sun, 28 Apr 2002 21:11:34 +0000 (21:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352541 13f79535-47bb-0310-9956-ffa450edef68

tools/antipede/resources/stylesheets/build.xsl [new file with mode: 0644]

diff --git a/tools/antipede/resources/stylesheets/build.xsl b/tools/antipede/resources/stylesheets/build.xsl
new file mode 100644 (file)
index 0000000..92fd964
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" ?>
+<!-- Create documentation from an ant build file  -->
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
+       <xsl:output method="html"  indent="yes"/>
+       
+       <xsl:template match="project">
+               <html>
+               <body>
+               <h1><xsl:value-of select="./@name"/></h1>
+                       <pre><xsl:value-of select="./description"/></pre>
+                       <br />
+                       <xsl:apply-templates select="target"/>
+               </body>
+               </html>
+       </xsl:template >
+       
+       <xsl:template match="*[ @description | @taskname]">
+       <!-- use taskname if it exists, otherwise use the task element name-->
+               <li><b>
+               <xsl:if test="not(@taskname)">
+                               <xsl:value-of select="name()"/>
+               </xsl:if>
+               <xsl:value-of select="@taskname"/></b>
+               <xsl:text> </xsl:text>
+               <xsl:value-of select="@description"/>
+               </li>
+       </xsl:template>
+       
+       <xsl:template match="//target">
+         
+         <xsl:if test = "not(starts-with(@name,'-'))">
+          <p>
+               <b><xsl:value-of select="@name"/></b> - 
+               <xsl:value-of select="@description"/>
+               <ul><xsl:apply-templates select="./*"/></ul>
+               </p>
+         </xsl:if>
+       </xsl:template>
+               
+       <xsl:template match="*"/>
+       
+</xsl:stylesheet>