commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject cvs commit: jakarta-commons-sandbox/sql build.xml build.properties
Date Sat, 16 Oct 2004 10:09:16 GMT
tomdz       2004/10/16 03:09:16

  Modified:    sql      build.xml build.properties
  Added:       sql/xdocs/stylesheets site.vsl site_printable.vsl site.xsl
  Log:
  Added doc target to Ant build script
  
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/sql/xdocs/stylesheets/site.vsl
  
  Index: site.vsl
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  
  <!-- Content Stylesheet for Site -->
  
      ## Defined variables
      #set ($bodybg = "#ffffff")
      #set ($bodyfg = "#000000")
      #set ($bodylink = "#525D76")
      #set ($bannerbg = "#525D76")
      #set ($bannerfg = "#ffffff")
      #set ($subbannerbg = "#828DA6")
      #set ($subbannerfg = "#ffffff")
      #set ($tablethbg = "#039acc")
      #set ($tabletdbg = "#a0ddf0")
  
  <!-- start the processing -->
  #document()
  <!-- end the processing -->
  
  ## This is where the macro's live
  
  #macro ( table $table)
  <table>
      #foreach ( $items in $table.getChildren() )
          #if ($items.getName().equals("tr"))
              #tr ($items)
          #end
      #end
  </table>
  #end
  
  #macro ( tr $tr)
  <tr>
      #foreach ( $items in $tr.getChildren() )
          #if ($items.getName().equals("td"))
              #td ($items)
          #elseif ($items.getName().equals("th"))
              #th ($items)
          #end
      #end
  </tr>
  #end
  
  #macro ( td $value)
  #if ($value.getAttributeValue("colspan"))
  #set ($colspan = $value.getAttributeValue("colspan"))
  #end
  #if ($value.getAttributeValue("rowspan"))
  #set ($rowspan = $value.getAttributeValue("rowspan"))
  #end
  <td bgcolor="$tabletdbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
      <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          #if ($value.getText().length() != 0 || $value.hasChildren())
          $value.getContent()
          #else
          &nbsp;
          #end
      </font>
  </td>
  #end
  
  #macro ( th $value)
  #if ($value.getAttributeValue("colspan"))
  #set ($colspan = $value.getAttributeValue("colspan"))
  #end
  #if ($value.getAttributeValue("rowspan"))
  #set ($rowspan = $value.getAttributeValue("rowspan"))
  #end
  <td bgcolor="$tablethbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
      <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          #if ($value.getText().length() != 0 || $value.hasChildren())
          $value.getContent()
          #else
          &nbsp;
          #end
      </font>
  </td>
  #end
  
  #macro ( projectanchor $name $value )
  #if ($value.startsWith("http://"))
      <a href="$value">$name</a>
  #elseif ($value.startsWith("/site"))
      <a href="http://jakarta.apache.org$value">$name</a>
  #else
      <a href="$relativePath$value">$name</a>
  #end
  #end
  
  #macro ( metaauthor $author $email )
              <meta name="author" value="$author">
              <meta name="email" value="$email">
  #end
  
  #macro ( image $value )
  #if ($value.getAttributeValue("width"))
  #set ($width=$value.getAttributeValue("width"))
  #end
  #if ($value.getAttributeValue("height"))
  #set ($height=$value.getAttributeValue("height"))
  #end
  #if ($value.getAttributeValue("align"))
  #set ($align=$value.getAttributeValue("align"))
  #end
  <img src="$relativePath$value.getAttributeValue("src")" width="$!width" height="$!height"
align="$!align">
  #end
  
  #macro ( source $value)
      <div align="left">
      <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>$escape.getText($value.getText())</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      </table>
      </div>
  #end
  
  #macro ( subsection $subsection)
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <tr><td bgcolor="$subbannerbg">
          <font color="$subbannerfg" face="arial,helvetica,sanserif">
            <a name="$subsection.getAttributeValue("anchor")"><strong>$subsection.getAttributeValue("name")</strong></a>
          </font>
        </td></tr>
        <tr><td>
          <blockquote>
          #foreach ( $items in $subsection.getChildren() )
              #if ($items.getName().equals("img"))
                  #image ($items)
              #elseif ($items.getName().equals("source"))
                  #source ($items)
              #elseif ($items.getName().equals("table"))
                  #table ($items)
              #else
                  $items
              #end
          #end
          </blockquote>
        </td></tr>
        <tr><td><br/></td></tr>
      </table>
  #end
  
  #macro ( section $section)
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <tr><td bgcolor="$bannerbg">
          <font color="$bannerfg" face="arial,helvetica,sanserif">
            <a name="$section.getAttributeValue("anchor")"><strong>$section.getAttributeValue("name")</strong></a>
          </font>
        </td></tr>
        <tr><td>
          <blockquote>
          #foreach ( $items in $section.getChildren() )
              #if ($items.getName().equals("img"))
                  #image ($items)
              #elseif ($items.getName().equals("source"))
                  #source ($items)
              #elseif ($items.getName().equals("table"))
                  #table ($items)
              #elseif ($items.getName().equals("subsection"))
                  #subsection ($items)
              #else
                  $items
              #end
          #end
          </blockquote>
          </p>
        </td></tr>
        <tr><td><br/></td></tr>
      </table>
  #end
  
  #macro ( makeProject )
      #set ($menus = $project.getChild("body").getChildren("menu"))
      #foreach ( $menu in $menus )
          <p><strong>$menu.getAttributeValue("name")</strong></p>
          <ul>
          #foreach ( $item in $menu.getChildren() )
              #set ($name = $item.getAttributeValue("name"))
              <li>#projectanchor($name $item.getAttributeValue("href"))</li>
          #end
          </ul>
      #end
  #end
  
  #macro (getProjectImage)
  #if ($project.getChild("logo"))
  <td align="left">
  <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif"
border="0"/></a>
  </td>
  <td align="right">
  #set ( $logoString = $project.getChild("logo").getAttributeValue("href") )
  #if ( $logoString.startsWith("/") )
  <a href="$project.getAttributeValue("href")"><img src="$relativePath$logoString"
alt="$project.getChild("logo").getText()" border="0"/></a>
  #else
  <a href="$project.getAttributeValue("href")"><img src="$relativePath/$logoString"
alt="$project.getChild("logo").getText()" border="0"/></a>
  #end
  </td>
  #else
  <td colspan="2">
  <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif"
align="left" border="0"/></a>
  </td>
  #end
  #end
  
  #macro (printMeta $metaElement)
  <meta #set ($attribs = $metaElement.getAttributes())
  #foreach ($a in $attribs) $a.getName()="$a.getValue()" #end />
  #end
  
  #macro (document)
      <!-- ====================================================================== -->
      <!-- Main Page Section -->
      <!-- ====================================================================== -->
      <html>
          <head>
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  
              #set ($authors = $root.getChild("properties").getChildren("author"))
              #foreach ( $au in $authors )
                  #metaauthor ( $au.getText() $au.getAttributeValue("email") )
              #end
  
             #set ($metas = $root.getChildren("meta"))
  
              ##    Parse meta directives such as
              ##    <meta name="keyword" content="jakarta, java"/>
              #foreach ($meta in $metas) #printMeta($meta) #end
  
              <title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title>
          </head>
  
          <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">
              <table border="0" width="100%" cellspacing="0">
                  <!-- TOP IMAGE -->
                  <tr>
                      #getProjectImage()
                  </tr>
              </table>
              <table border="0" width="100%" cellspacing="4">
                  <tr><td colspan="2">
                      <hr noshade="" size="1"/>
                  </td></tr>
  
                  <tr>
                      <!-- LEFT SIDE NAVIGATION -->
                      <td width="15%" valign="top" nowrap="true">
                      #makeProject()
                      </td>
                      <td width="85%" align="left" valign="top">
                      #set ($allSections = $root.getChild("body").getChildren("section"))
                      #foreach ( $section in $allSections )
                          #section ($section)
                      #end
                      </td>
                  </tr>
  
                  <!-- FOOTER -->
                  <tr><td colspan="2">
                      <hr noshade="" size="1"/>
                  </td></tr>
                  <tr><td colspan="2">
                      <div align="center"><font color="$bodylink" size="-1"><em>
                      Copyright &#169; 1999-2002, Apache Software Foundation
                      </em></font></div>
                  </td></tr>
              </table>
          </body>
      </html>
  #end
  
  
  
  
  
  
  
  
  1.1                  jakarta-commons-sandbox/sql/xdocs/stylesheets/site_printable.vsl
  
  Index: site_printable.vsl
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  
  <!-- Content Stylesheet for Site -->
  
      ## Defined variables
      #set ($bodybg = "#ffffff")
      #set ($bodyfg = "#000000")
      #set ($bodylink = "#525D76")
      #set ($bannerbg = "#525D76")
      #set ($bannerfg = "#ffffff")
      #set ($subbannerbg = "#828DA6")
      #set ($subbannerfg = "#ffffff")
      #set ($tablethbg = "#039acc")
      #set ($tabletdbg = "#a0ddf0")
  
  <!-- start the processing -->
  #document()
  <!-- end the processing -->
  
  ## This is where the macro's live
  
  #macro ( table $table)
  <table>
      #foreach ( $items in $table.getChildren() )
          #if ($items.getName().equals("tr"))
              #tr ($items)
          #end
      #end
  </table>
  #end
  
  #macro ( tr $tr)
  <tr>
      #foreach ( $items in $tr.getChildren() )
          #if ($items.getName().equals("td"))
              #td ($items)
          #elseif ($items.getName().equals("th"))
              #th ($items)
          #end
      #end
  </tr>
  #end
  
  #macro ( td $value)
  #if ($value.getAttributeValue("colspan"))
  #set ($colspan = $value.getAttributeValue("colspan"))
  #end
  #if ($value.getAttributeValue("rowspan"))
  #set ($rowspan = $value.getAttributeValue("rowspan"))
  #end
  <td bgcolor="$tabletdbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
      <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          #if ($value.getText().length() != 0 || $value.hasChildren())
          $value.getContent()
          #else
          &nbsp;
          #end
      </font>
  </td>
  #end
  
  #macro ( th $value)
  #if ($value.getAttributeValue("colspan"))
  #set ($colspan = $value.getAttributeValue("colspan"))
  #end
  #if ($value.getAttributeValue("rowspan"))
  #set ($rowspan = $value.getAttributeValue("rowspan"))
  #end
  <td bgcolor="$tablethbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
      <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          #if ($value.getText().length() != 0 || $value.hasChildren())
          $value.getContent()
          #else
          &nbsp;
          #end
      </font>
  </td>
  #end
  
  #macro ( projectanchor $name $value )
  #if ($value.startsWith("http://"))
      &#149;&nbsp;<a href="$value">$name</a>
  #elseif ($value.startsWith("/site"))
      &#149;&nbsp;<a href="http://jakarta.apache.org$value">$name</a>
  #else
      &#149;&nbsp;<a href="$relativePath$value">$name</a>
  #end
  #end
  
  #macro ( metaauthor $author $email )
              <meta name="author" value="$author">
              <meta name="email" value="$email">
  #end
  
  #macro ( image $value )
  #if ($value.getAttributeValue("width"))
  #set ($width=$value.getAttributeValue("width"))
  #end
  #if ($value.getAttributeValue("height"))
  #set ($height=$value.getAttributeValue("height"))
  #end
  #if ($value.getAttributeValue("align"))
  #set ($align=$value.getAttributeValue("align"))
  #end
  <img src="$relativePath$value.getAttributeValue("src")" width="$!width" height="$!height"
align="$!align">
  #end
  
  #macro ( source $value)
      <div align="left">
        <font size="2"><pre>$escape.getText($value.getText())</pre></font>
      </div>
  #end
  
  #macro ( subsection $subsection)
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <tr><td bgcolor="$subbannerbg">
          <font color="$subbannerfg" face="arial,helvetica,sanserif">
            <a name="$subsection.getAttributeValue("name")"><strong>$subsection.getAttributeValue("name")</strong></a>
          </font>
        </td></tr>
        <tr><td><br/></td></tr>
        <tr><td>
          <blockquote>
          #foreach ( $items in $subsection.getChildren() )
              #if ($items.getName().equals("img"))
                  #image ($items)
              #elseif ($items.getName().equals("source"))
                  #source ($items)
              #elseif ($items.getName().equals("table"))
                  #table ($items)
              #else
                  $items
              #end
          #end
          </blockquote>
        </td></tr>
        <tr><td><br/></td></tr>
      </table>
  #end
  
  #macro ( section $section)
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <tr><td bgcolor="$bannerbg">
          <font color="$bannerfg" face="arial,helvetica,sanserif">
            <a name="$section.getAttributeValue("name")"><strong>$section.getAttributeValue("name")</strong></a>
          </font>
        </td></tr>
        <tr><td><br/></td></tr>
        <tr><td>
          <!--<blockquote>-->
          #foreach ( $items in $section.getChildren() )
              #if ($items.getName().equals("img"))
                  #image ($items)
              #elseif ($items.getName().equals("source"))
                  #source ($items)
              #elseif ($items.getName().equals("table"))
                  #table ($items)
              #elseif ($items.getName().equals("subsection"))
                  #subsection ($items)
              #else
                  $items
              #end
          #end
          <!--</blockquote>-->
          </p>
        </td></tr>
        <tr><td><br/></td></tr>
      </table>
  #end
  
  #macro (getProjectImage)
  #if ($project.getChild("logo"))
  <td align="left">
  <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif"
border="0"/></a>
  
  #set ( $logoString = $project.getChild("logo").getAttributeValue("href") )
  #if ( $logoString.startsWith("/") )
  <a href="$project.getAttributeValue("href")"><img src="$relativePath$logoString"
alt="$project.getChild("logo").getText()" border="0"/></a>
  #else
  <a href="$project.getAttributeValue("href")"><img src="$relativePath/$logoString"
alt="$project.getChild("logo").getText()" border="0"/></a>
  #end
  </td>
  #else
  <td>
  <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif"
align="left" border="0"/></a>
  </td>
  #end
  #end
  
  #macro ( makeHorizontalProject )
      #set ($menus = $project.getChild("body").getChildren("menu"))
      <table cellspacing="4">
      #foreach ( $menu in $menus )
          <tr><td>
          <strong>$menu.getAttributeValue("name")</strong>
          </td><td>
          #foreach ( $item in $menu.getChildren() )
              #set ($name = $item.getAttributeValue("name"))
               #projectanchor($name $item.getAttributeValue("href"))&nbsp;
          #end
          </td>
          </tr>
      #end
      </table>
  #end
  
  #macro (document)
      <!-- ====================================================================== -->
      <!-- Main Page Section -->
      <!-- ====================================================================== -->
      <html>
          <head>
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  
              #set ($authors = $root.getChild("properties").getChildren("author"))
              #foreach ( $au in $authors )
                  #metaauthor ( $au.getText() $au.getAttributeValue("email") )
              #end
  
              <title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title>
          </head>
  
          <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">        
              <table border="0" width="100%" cellspacing="0">
                  <!-- TOP IMAGE -->
                  <tr>
                      #getProjectImage()
                  </tr>
              </table>
              <table border="0" width="100%" cellspacing="4">
                  <tr><td>
                      <hr noshade="" size="1"/>
                  </td></tr>
                  <tr>
                      <td align="left" valign="top">
                      #set ($allSections = $root.getChild("body").getChildren("section"))
                      #foreach ( $section in $allSections )
                          #section ($section)
                      #end
                      </td>
                  </tr>
                  <tr><td>
                      <hr noshade="" size="1"/>
                  </td></tr>
                  <tr><td>
                  <!-- FOOT Navigation -->
                  #makeHorizontalProject ()
                  <!-- FOOTER -->
                  <tr><td>
                      <hr noshade="" size="1"/>
                  </td></tr>
                  <tr><td>
                      <div align="center"><font color="$bodylink" size="-1"><em>
                      Copyright &#169; 1999-2001, Apache Software Foundation
                      </em></font></div>
                  </td></tr>
              </table>
          </body>
      </html>
  #end
  
  
  
  1.1                  jakarta-commons-sandbox/sql/xdocs/stylesheets/site.xsl
  
  Index: site.xsl
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!-- Content Stylesheet for "jakarta-site2" Documentation -->
  <!-- NOTE:  Changes here should also be reflected in "site.vsl" and vice
       versa, so either Anakia or XSLT can be used for document generation.   -->
  
  
  <!-- Outstanding Compatibility Issues (with Anakia-based stylesheets):
  
  * Handling of the <image> element to insert relative path prefixes
  
  * Functional equivalent of "site_printable.vsl" not yet started.
  
  -->
  
  
  <!-- $Id: site.xsl,v 1.1 2004/10/16 10:09:15 tomdz Exp $ -->
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
  
  
    <!-- Output method -->
    <xsl:output method="html"
              encoding="iso-8859-1"
                indent="yes"/>
  
  
    <!-- Defined parameters (overrideable) -->
    <xsl:param    name="relative-path" select="'.'"/>
  
    <!-- Defined variables (non-overrideable) -->
    <xsl:variable name="body-bg"       select="'#ffffff'"/>
    <xsl:variable name="body-fg"       select="'#000000'"/>
    <xsl:variable name="body-link"     select="'#003366'"/>
    <xsl:variable name="banner-bg"     select="'#525D76'"/>
    <xsl:variable name="banner-fg"     select="'#ffffff'"/>
    <xsl:variable name="sub-banner-bg" select="'#828DA6'"/>
    <xsl:variable name="sub-banner-fg" select="'#ffffff'"/>
    <xsl:variable name="table-th-bg"   select="'#039acc'"/>
    <xsl:variable name="table-td-bg"   select="'#a0ddf0'"/>
    <xsl:variable name="source-color"  select="'#023264'"/>
    <xsl:variable name="header-color"  select="'#003366'"/>
  
  
  
    <!-- Process an entire document into an HTML page -->
    <xsl:template match="document">
      <xsl:variable name="project"
                  select="document('../project.xml')/project"/>
  
      <html>
      <head>
      <xsl:apply-templates select="meta"/>
      <title><xsl:value-of select="$project/title"/> - <xsl:value-of select="properties/title"/></title>
      <xsl:for-each select="properties/author">
        <xsl:variable name="name">
          <xsl:value-of select="."/>
        </xsl:variable>
        <xsl:variable name="email">
          <xsl:value-of select="@email"/>
        </xsl:variable>
        <meta name="author" value="{$name}"/>
        <meta name="email" value="{$email}"/>
      </xsl:for-each>
      </head>
  
      <body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}"
            alink="{$body-link}" vlink="{$body-link}">
  
      <table border="0" width="100%" cellspacing="4">
  
        <xsl:comment>PAGE HEADER</xsl:comment>
        <tr bgcolor="{$header-color}"><td colspan="2">
  
          <xsl:comment>DB LOGO</xsl:comment>
          <a href="http://db.apache.org/">
            <img src="images/db-logo-blue.png"
               align="left" alt="The Apache DB Project" border="0"/>
          </a>
          <br/>
          <xsl:if test="$project/logo">
            <xsl:variable name="alt">
              <xsl:value-of select="$project/logo"/>
            </xsl:variable>
            <xsl:variable name="home">
              <xsl:value-of select="$project/@href"/>
            </xsl:variable>
            <xsl:variable name="src">
              <xsl:value-of select="$project/logo/@href"/>
            </xsl:variable>
  
            <xsl:comment>PROJECT LOGO</xsl:comment>
            <a href="{$home}">
              <img src="{$src}" align="right" alt="{$alt}" border="0"/>
            </a>
          </xsl:if>
  
        </td></tr>
  
        <xsl:comment>HEADER SEPARATOR</xsl:comment>
        <tr>
          <td colspan="2">
            <hr noshade="" size="1"/>
          </td>
        </tr>
  
        <tr>
  
          <xsl:comment>LEFT SIDE NAVIGATION</xsl:comment>
          <td width="15%" valign="top">
  <!-- We use a smaller font for the menu -->
              <font size="-1">
            <xsl:apply-templates select="$project/body/menu"/>
              </font>
          </td>
  
          <xsl:comment>RIGHT SIDE MAIN BODY</xsl:comment>
          <td width="85%" valign="top" align="left">
            <xsl:apply-templates select="body/section"/>
          </td>
  
        </tr>
  
        <xsl:comment>FOOTER SEPARATOR</xsl:comment>
        <tr>
          <td colspan="2">
            <hr noshade="" size="1"/>
          </td>
        </tr>
  
        <xsl:comment>PAGE FOOTER</xsl:comment>
        <tr><td colspan="2">
          <div align="center"><font color="{$body-link}" size="-1"><em>
          Copyright &#169; 1999-2004, Apache Software Foundation
          </em></font></div>
        </td></tr>
  
      </table>
      </body>
      </html>
  
    </xsl:template>
  
  
    <!-- Process a menu for the navigation bar -->
    <xsl:template match="menu">
      <p><strong><xsl:value-of select="@name"/></strong></p>
      <ul>
        <xsl:apply-templates select="item"/>
      </ul>
    </xsl:template>
  
  
    <!-- Process a menu item for the navigation bar -->
    <xsl:template match="item">
      <xsl:variable name="href">
        <xsl:choose>
              <xsl:when test="starts-with(@href, 'http://')">
                  <xsl:value-of select="@href"/>
              </xsl:when>
              <xsl:when test="starts-with(@href, '/site')">
                  <xsl:text>http://db.apache.org</xsl:text><xsl:value-of select="@href"/>
              </xsl:when>
              <xsl:otherwise>
                  <xsl:value-of select="$relative-path"/><xsl:value-of select="@href"/>
              </xsl:otherwise>
        </xsl:choose>
      </xsl:variable>
      <li><a href="{$href}"><xsl:value-of select="@name"/></a></li>
    </xsl:template>
  
  
    <!-- Process a documentation section -->
    <xsl:template match="section">
      <xsl:variable name="name">
        <xsl:value-of select="@name"/>
      </xsl:variable>
      <xsl:variable name="anchor">
        <xsl:choose>
        	<xsl:when test="@anchor">
  	      <xsl:value-of select="@anchor"/>
  	    </xsl:when>
  	    <xsl:otherwise>
  	      <xsl:value-of select="@name"/>
  	    </xsl:otherwise>
  	  </xsl:choose>
  	</xsl:variable>
  
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <!-- Section heading -->
        <tr><td bgcolor="{$banner-bg}">
            <font color="{$banner-fg}" face="arial,helvetica.sanserif">
            <a name="{$anchor}">
            <strong><xsl:value-of select="@name"/></strong></a></font>
        </td></tr>
        <!-- Section body -->
        <tr><td><blockquote>
          <xsl:apply-templates/>
        </blockquote></td></tr>
      </table>
    </xsl:template>
  
  
    <!-- Process a documentation subsection -->
    <xsl:template match="subsection">
      <xsl:variable name="name">
        <xsl:value-of select="@name"/>
      </xsl:variable>
      <xsl:variable name="anchor">
        <xsl:choose>
        	<xsl:when test="@anchor">
  	      <xsl:value-of select="@anchor"/>
  	    </xsl:when>
  	    <xsl:otherwise>
  	      <xsl:value-of select="@name"/>
  	    </xsl:otherwise>
  	  </xsl:choose>
      </xsl:variable>
      <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="{$anchor}">
            <strong><xsl:value-of select="@name"/></strong></a></font>
        </td></tr>
        <!-- Subsection body -->
        <tr><td><blockquote>
          <xsl:apply-templates/>
        </blockquote></td></tr>
      </table>
    </xsl:template>
  
  
    <!-- Process a source code example -->
    <xsl:template 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>
              <xsl:value-of select="."/>
            </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>
    </xsl:template>
  
    <!-- specially process td tags ala site.vsl -->
    <xsl:template match="td">
      <td bgcolor="{$table-td-bg}" valign="top" align="left">
          <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of
select="@colspan"/></xsl:attribute></xsl:if>
          <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of
select="@rowspan"/></xsl:attribute></xsl:if>
          <font color="#000000" size="-1" face="arial,helvetica,sanserif">
              <xsl:apply-templates/>
          </font>
      </td>
    </xsl:template>
  
    <!-- handle th ala site.vsl -->
    <xsl:template match="th">
      <td bgcolor="{$table-th-bg}" valign="top">
          <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of
select="@colspan"/></xsl:attribute></xsl:if>
          <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of
select="@rowspan"/></xsl:attribute></xsl:if>
          <font color="#000000" size="-1" face="arial,helvetica,sanserif">
              <xsl:apply-templates />
          </font>
      </td>
    </xsl:template>
  
    <!-- Process everything else by just passing it through -->
    <xsl:template match="*|@*">
      <xsl:copy>
        <xsl:apply-templates select="@*|*|text()"/>
      </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.10      +21 -0     jakarta-commons-sandbox/sql/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/sql/build.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.xml	17 Sep 2004 18:00:12 -0000	1.9
  +++ build.xml	16 Oct 2004 10:09:15 -0000	1.10
  @@ -135,4 +135,25 @@
                       todir="${build.test.dir}"/>
           </junitreport>
       </target>
  +
  +    <!-- Doesn't work yet, the site.xsl needs work -->
  +    <target name="doc" description="Creates documentation via XSLT">
  +        <mkdir dir="${build.doc.dir}"/>
  +        <style basedir="${src.doc.dir}"
  +               destdir="${build.doc.dir}"
  +               extension=".html"
  +               style="${src.doc.dir}/stylesheets/site.xsl"
  +               excludes="empty.xml"
  +               includes="**/*.xml">
  +          <param name="relative-path" expression="."/>
  +        </style>
  +        <copy todir="${build.doc.dir}/images" filtering="no">
  +          <fileset dir="${src.doc.dir}/images">
  +            <include name="**/*.gif"/>
  +            <include name="**/*.jpeg"/>
  +            <include name="**/*.jpg"/>
  +            <include name="**/*.png"/>
  +          </fileset>
  +        </copy>
  +    </target>
   </project>
  
  
  
  1.3       +2 -0      jakarta-commons-sandbox/sql/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/sql/build.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.properties	18 Jul 2004 21:55:58 -0000	1.2
  +++ build.properties	16 Oct 2004 10:09:15 -0000	1.3
  @@ -18,11 +18,13 @@
   src.java.dir=${src.dir}/java
   src.test.dir=${src.dir}/test
   src.resources.dir=${src.dir}/resources
  +src.doc.dir=xdocs
   
   build.dir=target
   build.java.dir=${build.dir}/classes
   build.test.dir=${build.dir}/test
   build.javadoc.dir=${build.dir}/javadoc
  +build.doc.dir=${build.dir}/doc
   
   dist.dir=dist
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message