Author: kkolinko
Date: Sun Oct 26 14:08:45 2014
New Revision: 1634330

URL: http://svn.apache.org/r1634330
Log:
Fix standalone javadoc generation in jdbc-pool using "javadoc" task in 
build.xml of jdbc-pool.
I doubt anyone uses it. Usually javadocs for the pool are generated from 
Tomcat-wide <javadoc> task in Tomcat's main build.xml file.

There is a trick: jdbc-pool.xml is transformed into package.html file.
Javadoc tool cannot parse the generated package.html if the page has complex 
headers, footers, HTML comments.

Merged r1634326 r1634329 from tomcat/trunk.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/package.xsl
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1634326,1634329

Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/package.xsl
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/package.xsl?rev=1634330&r1=1634329&r2=1634330&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/package.xsl (original)
+++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/package.xsl Sun Oct 26 14:08:45 
2014
@@ -15,8 +15,13 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!-- Content Stylesheet for "tomcat-docs" Documentation -->
-
+<!--
+  Stylesheet that generates "package.html" for Javadoc tool
+  from jdbc-pool.xml documentation file.
+  It is based on "tomcat-docs" stylesheet, but it needs to avoid
+  generating complicated headers and footers, as those cannot be
+  digested by Javadoc tool and break layout of javadoc pages.
+-->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
   version="1.0">
 
@@ -28,14 +33,8 @@
 
 
   <!-- Defined parameters (overrideable) -->
-  <xsl:param    name="home-name"        select="'The Tomcat JDBC Pool 
Project'"/>
-  <xsl:param    name="home-href"        select="'http://tomcat.apache.org/'"/>
-  <xsl:param    name="home-logo"        select="'/images/tomcat.gif'"/>
-  <xsl:param    name="printer-logo"     select="'/images/printer.gif'"/>
-  <xsl:param    name="apache-logo"      select="'/images/asf-logo.gif'"/>
   <xsl:param    name="relative-path"    select="'.'"/>
   <xsl:param    name="void-image"       select="'/images/void.gif'"/>
-  <xsl:param    name="project-menu"     select="'menu'"/>
   <xsl:param    name="standalone"       select="''"/>
   <xsl:param    name="buglink"          
select="'http://issues.apache.org/bugzilla/show_bug.cgi?id='"/>
   <xsl:param    name="revlink"          
select="'http://svn.apache.org/viewvc?view=rev&amp;rev='"/>
@@ -60,123 +59,19 @@
     <html>
     <head>
     <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>
-    <style type="text/css" media="print">
-.noPrint {display: none;}
-td#mainBody {width: 100%;}
-</style>
     </head>
 
     <body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}"
           alink="{$body-link}" vlink="{$body-link}">
 
-    <table border="0" width="100%" cellspacing="0">
-
-      <xsl:comment>PAGE HEADER</xsl:comment>
-      <tr>
-        <td>
-        <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="$relative-path"/><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>
-        <td>
-          <font face="arial,helvetica,sanserif">
-            <h1><xsl:value-of select="$project/title"/></h1>
-          </font>
-        </td>
-        <td>
-          <xsl:comment>APACHE LOGO</xsl:comment>
-          <xsl:variable name="src">
-            <xsl:value-of select="$relative-path"/><xsl:value-of 
select="$apache-logo"/>
-          </xsl:variable>
-          <a href="http://www.apache.org/";>
-            <img src="{$src}" align="right" alt="Apache Logo" border="0"/>
-          </a>
-        </td>
-      </tr>
-    </table>
-
-    <table border="0" width="100%" cellspacing="4">
-
-      <xsl:comment>HEADER SEPARATOR</xsl:comment>
-      <tr>
-        <td colspan="2">
-          <hr noshade="noshade" size="1"/>
-        </td>
-      </tr>
-
-      <tr>
-
-        <xsl:comment>RIGHT SIDE MAIN BODY</xsl:comment>
-        <td width="100%" valign="top" align="left" id="mainBody">
-          <h1><xsl:value-of select="project/title"/></h1>
-          <h2><xsl:value-of select="properties/title"/></h2>
+          <h2><xsl:value-of select="properties/title"/>.</h2>
           <xsl:apply-templates select="body/section"/>
-        </td>
-
-      </tr>
-
-      <xsl:comment>FOOTER SEPARATOR</xsl:comment>
-      <tr>
-        <td colspan="2">
-          <hr noshade="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-2014, 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:value-of select="@href"/>
-    </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">
@@ -322,15 +217,6 @@ td#mainBody {width: 100%;}
       <xsl:when test="$standalone = 'standalone'">
         <xsl:apply-templates/>
       </xsl:when>
-      <xsl:when test="$project-menu != 'menu' and starts-with(@href,'../')">
-        <a href="../{$href}"><xsl:apply-templates/></a>
-      </xsl:when>
-      <xsl:when test="$project-menu != 'menu' and starts-with(@href,'./') and 
contains(substring(@href,3),'/')">
-        <a href=".{$href}"><xsl:apply-templates/></a>
-      </xsl:when>
-      <xsl:when test="$project-menu != 'menu' and not(contains(@href,'//')) 
and not(starts-with(@href,'/')) and not(starts-with(@href,'#')) and 
contains(@href,'/')">
-        <a href="../{$href}"><xsl:apply-templates/></a>
-      </xsl:when>
       <xsl:when test="$href != ''">
         <a href="{$href}"><xsl:apply-templates/></a>
       </xsl:when>
@@ -341,91 +227,6 @@ td#mainBody {width: 100%;}
     </xsl:choose>
   </xsl:template>
 
-  <!-- Changelog related tags -->
-  <xsl:template match="changelog">
-    <table border="0" cellpadding="2" cellspacing="2">
-      <xsl:apply-templates/>
-    </table>
-  </xsl:template>
-
-  <xsl:template match="changelog/add">
-    <tr>
-      <xsl:variable name="src"><xsl:value-of 
select="$relative-path"/>/images/add.gif</xsl:variable>
-      <td><img alt="add" class="icon" src="{$src}"/></td>
-      <td><xsl:apply-templates/></td>
-    </tr>
-  </xsl:template>
-
-  <xsl:template match="changelog/update">
-    <tr>
-      <xsl:variable name="src"><xsl:value-of 
select="$relative-path"/>/images/update.gif</xsl:variable>
-      <td><img alt="update" class="icon" src="{$src}"/></td>
-      <td><xsl:apply-templates/></td>
-    </tr>
-  </xsl:template>
-
-  <xsl:template match="changelog/design">
-    <tr>
-      <xsl:variable name="src"><xsl:value-of 
select="$relative-path"/>/images/design.gif</xsl:variable>
-      <td><img alt="design" class="icon" src="{$src}"/></td>
-      <td><xsl:apply-templates/></td>
-    </tr>
-  </xsl:template>
-
-  <xsl:template match="changelog/docs">
-    <tr>
-      <xsl:variable name="src"><xsl:value-of 
select="$relative-path"/>/images/docs.gif</xsl:variable>
-      <td><img alt="docs" class="icon" src="{$src}"/></td>
-      <td><xsl:apply-templates/></td>
-    </tr>
-  </xsl:template>
-
-  <xsl:template match="changelog/fix">
-    <tr>
-      <xsl:variable name="src"><xsl:value-of 
select="$relative-path"/>/images/fix.gif</xsl:variable>
-      <td><img alt="fix" class="icon" src="{$src}"/></td>
-      <td><xsl:apply-templates/></td>
-    </tr>
-  </xsl:template>
-
-  <xsl:template match="changelog/scode">
-    <tr>
-      <xsl:variable name="src"><xsl:value-of 
select="$relative-path"/>/images/code.gif</xsl:variable>
-      <td><img alt="code" class="icon" src="{$src}"/></td>
-      <td><xsl:apply-templates/></td>
-    </tr>
-  </xsl:template>
-
-  <!-- Process an attributes list with nested attribute elements -->
-  <xsl:template match="status">
-    <table border="1" cellpadding="5">
-      <tr>
-        <th width="15%" bgcolor="{$attributes-color}">
-          <font color="#ffffff">Priority</font>
-        </th>
-        <th width="50%" bgcolor="{$attributes-color}">
-          <font color="#ffffff">Action Item</font>
-        </th>
-        <th width="25%" bgcolor="{$attributes-color}">
-          <font color="#ffffff">Volunteers</font>
-        </th>
-        <xsl:for-each select="item">
-        <tr>
-          <td align="left" valign="center">
-            <xsl:value-of select="@priority"/>
-          </td>
-          <td align="left" valign="center">
-            <xsl:apply-templates/>
-          </td>
-          <td align="left" valign="center">
-            <xsl:value-of select="@owner"/>
-          </td>
-        </tr>
-        </xsl:for-each>
-      </tr>
-    </table>
-  </xsl:template>
-
   <!-- Link to a bug report -->
   <xsl:template match="bug">
       <xsl:variable name="link"><xsl:value-of select="$buglink"/><xsl:value-of 
select="text()"/></xsl:variable>

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1634330&r1=1634329&r2=1634330&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sun Oct 26 14:08:45 2014
@@ -193,6 +193,10 @@
         <bug>57079</bug>: Use Tomcat version number for jdbc-pool module when
         building and shipping the module as part of Tomcat. (markt/kkolinko)
       </fix>
+      <fix>
+        Fix broken overview page in javadoc generated via "javadoc" task in
+        jdbc-pool build.xml file. (kkolinko)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to