Author: tomdz
Date: Fri Nov 10 00:20:39 2006
New Revision: 473250

URL: http://svn.apache.org/viewvc?view=rev&rev=473250
Log:
More work on the Ant task doc

Added:
    db/ddlutils/trunk/src/antdoc/styles.css
Modified:
    db/ddlutils/trunk/build.xml
    db/ddlutils/trunk/src/antdoc/templates/html/overview.vm
    db/ddlutils/trunk/src/antdoc/templates/html/task.vm

Modified: db/ddlutils/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/db/ddlutils/trunk/build.xml?view=diff&rev=473250&r1=473249&r2=473250
==============================================================================
--- db/ddlutils/trunk/build.xml (original)
+++ db/ddlutils/trunk/build.xml Fri Nov 10 00:20:39 2006
@@ -216,7 +216,10 @@
         <param name="-templatesdir" value="${antdoc.templates.dir}"/>
         <param name="-templates" value="html/main.vm" />
       </doclet>
-    </javadoc> 
+    </javadoc>
+    <copy todir="${build.antdoc.dir}">
+      <fileset dir="${src.antdoc.dir}" includes="*.css,*.js"/>
+    </copy>
   </target>
 
   <!-- ================================================================== -->

Added: db/ddlutils/trunk/src/antdoc/styles.css
URL: 
http://svn.apache.org/viewvc/db/ddlutils/trunk/src/antdoc/styles.css?view=auto&rev=473250
==============================================================================
--- db/ddlutils/trunk/src/antdoc/styles.css (added)
+++ db/ddlutils/trunk/src/antdoc/styles.css Fri Nov 10 00:20:39 2006
@@ -0,0 +1,87 @@
+body {
+    width: 780px;
+    margin-left: 20px;
+    font: normal 14px/18px Tahoma,Verdana,Helvetica,Arial,sans-serif;
+    color: #000;
+}
+a:link,
+a:visited,
+a:hover {
+    color: #777777;
+    text-decoration: underline;
+}
+a.anchor:link,
+a.anchor:hover {
+    color: #000;
+    text-decoration: none;
+}
+a:hover {
+    background-color: #000;
+    color: #fff;
+}
+a.anchor:hover {
+    background-color: #777;
+    color: #fff;
+}
+h2 {
+    font-size: 1.5em;
+    line-height: 1.7em;
+    color: #777777;
+}
+h3 {
+    font-size: 1.2em;
+    line-height: 1.4em;
+}
+code,
+pre {
+    font: normal 13px Courier,monospace;
+}
+pre {
+    border: 1px solid #ddd;
+    padding: 10px;    
+}
+fieldset.taskDescription,
+fieldset.taskParameters,
+fieldset.taskNestedElements {
+    border: 1px solid #ddd;
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding-top: 10px;
+    padding-bottom: 20px;
+}
+fieldset.taskDescription legend,
+fieldset.taskParameters legend,
+fieldset.taskNestedElements legend {
+    font-style: bold;
+    font-size: 1.2em;
+}
+fieldset.note {
+    border: 1px solid #777;
+    margin: 20px;
+    padding: 10px;
+}
+fieldset.note legend {
+    font-style: bold;
+    font-size: 1.2em;
+}
+.taskParameterSeparator,
+.taskNestedElementSeparator {
+    margin-left: 10px;
+    margin-right: 10px;
+    border-top: 1px solid #ddd;
+}
+.taskParameterDefinition {
+    font: normal 13px Courier,monospace;
+}
+.taskParameterDefinition .requiredInfo {
+    font: normal 1em Tahoma,Verdana,Helvetica,Arial,sans-serif;
+    color: #000;
+}
+.taskParameterDescription {
+    margin-left: 20px;
+    margin-right: 20px;
+}
+.copyright {
+    margin-top: 20px;
+    font-size: 0.7em;
+}
\ No newline at end of file

Modified: db/ddlutils/trunk/src/antdoc/templates/html/overview.vm
URL: 
http://svn.apache.org/viewvc/db/ddlutils/trunk/src/antdoc/templates/html/overview.vm?view=diff&rev=473250&r1=473249&r2=473250
==============================================================================
--- db/ddlutils/trunk/src/antdoc/templates/html/overview.vm (original)
+++ db/ddlutils/trunk/src/antdoc/templates/html/overview.vm Fri Nov 10 00:20:39 
2006
@@ -2,30 +2,17 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
 <html>
 <head>
-  <title>$title</title>
-<style type="text/css">
-          /*  */
-          @import "skin/tigris.css";
-          @import "skin/quirks.css";
-          @import "skin/inst.css";
-         /*   */
-        </style>
-<link media="print" href="skin/print.css" type="text/css" rel="stylesheet">
-<link href="skin/forrest.css" type="text/css" rel="stylesheet">
-
+<title>$title</title>
+<link href="styles.css" type="text/css" rel="stylesheet">
 </head>
 <body>
-
 <h1>$title - Documentation</h1>
-
 <p>
 DdlUtils comes with two <a href="http://ant.apache.org/";>Ant</a> tasks that 
allow you to manipulate the
 database structure, insert data into the database, and to dump the database 
structure and
 data contained in it, to XML.
 </p>
-
 <h3>Using the Tasks</h3>
-
 <p>
 Lets see examples for how to use them:
 </p>
@@ -72,15 +59,13 @@
 in the path specified by <code>runtime-classpath</code>. In the above snippet, 
this path
 contains all JARs and ZIPs in sub-directory <code>lib</code>.
 </p>
-<div class="infomessage">
-<p>
-<strong>Note</strong>
-</p>
+<fieldset class="note">
+<legend>Note</legend>
 <p>
 Not every database platform supports creation of new databases via JDBC. 
Please refer to the
 documentation of the support for the individual databases <a 
href="database-support.html">here</a>.
 </p>
-</div>
+</fieldset>
 <p>
 The opposite direction is achieved via the <code>DatabaseToDdlTask</code> task:
 </p>
@@ -115,20 +100,14 @@
 to the file <code>db-schema.xml</code>. Likewise, the data in the database is 
written
 to the file <code>data.xml</code>.
 </p>
-
-
 <h3>Requirements</h3>
 <p>The DdlUtils tasks require Ant version 1.5 or newer.</p>
-
 <h3>Reference</h3>
 <p>The tasks reference documentation can be found <a 
href="index.all.html">here</a>.</p>
-
 <div class="copyright">
   <hr />
   <br />
   <em>Copyright &copy; 2005-2006 Apache Software Foundation. All Rights 
Reserved.</em>
 </div>
-
-       
 </body>
 </html>

Modified: db/ddlutils/trunk/src/antdoc/templates/html/task.vm
URL: 
http://svn.apache.org/viewvc/db/ddlutils/trunk/src/antdoc/templates/html/task.vm?view=diff&rev=473250&r1=473249&r2=473250
==============================================================================
--- db/ddlutils/trunk/src/antdoc/templates/html/task.vm (original)
+++ db/ddlutils/trunk/src/antdoc/templates/html/task.vm Fri Nov 10 00:20:39 2006
@@ -12,85 +12,62 @@
 <html>
 <head>
 <title>&lt;$taskDoc.getAntName()&gt;</title>
-<link rel="stylesheet" type="text/css" href="style.css" />
+<link href="styles.css" type="text/css" rel="stylesheet">
 </head>
 <body>
 <h2>#if( $taskDoc.getAnyCategory().length() > 0 ) $!taskDoc.getAntCategory() : 
#end $taskDoc.getAntName()</h2>
-<h3>Type</h3>
-<p>$taskDoc.getFullClassName()</p>
-<h3>Description</h3>
+<fieldset class="taskDescription">
+<legend><a class="anchor" name="description">Description</a></legend>
+<p>Java type: <a href="../javadoc/${taskDoc.getFullClassName().replace(".", 
"/")}.html"><code>$taskDoc.getFullClassName()</code></a></p>
 <p>$taskDoc.getComment()</p>
-<h3><a name="attributes"><strong>Parameters</strong></a></h3>
+</fieldset>
+<fieldset class="taskParameters">
+<legend><a class="anchor" name="parameters">Parameters</a></legend>
 #foreach ($attr in $taskDoc.attributes )
-       <h4>$attr</h4>
-       <table>
-               <tr>
-                       <td><b>Type</b></td>
-                       <td>$taskDoc.getAttributeType($attr)</td>
-               </tr>
-               <tr>
-                       <td><b>Required?</b></td>
-                       <td>
+  #if ($velocityCount > 1) <div class="taskParameterSeparator"></div> #end
+       <p class="taskParameterDefinition">
+         <a class="anchor" name="parameter-$attr">$attr</a> : 
$taskDoc.getAttributeType($attr)
+  #if ($taskDoc.getAttributeRequired($attr)) <span 
class="requiredInfo">(required)</span> #end
+       </p>
+       <p class="taskParameterDescription">
+       $taskDoc.getAttributeComment($attr) <br/>
   #if ($taskDoc.getAttributeRequired($attr))
-               <b>Yes</b> $taskDoc.getAttributeRequired($attr)
+      $taskDoc.getAttributeRequired($attr)
   #elseif ($taskDoc.getAttributeNotRequired($attr))
-                <b>No</b> $taskDoc.getAttributeNotRequired($attr)
-  #else
-                               <i>unknown</i>
+      $taskDoc.getAttributeNotRequired($attr)
   #end
-                       </td>
-               </tr>
-       </table>
-       <p>$taskDoc.getAttributeComment($attr)</p>
+       </p>
 #end
-<h3>Nested elements</h3>
+</fieldset>
+<fieldset class="taskNestedElements">
+<legend><a class="anchor" name="nestedElements">Nested elements</a></legend>
 #if ($taskDoc.isTaskContainer())
 <p>This Task is a Container (it accepts nested Tasks).</p>
 #end
 #if ($taskDoc.supportsCharacters())
 <p>This Task accepts text in its element body.</p>
 #end
+#set ($hasExternalRefs = false)
+#foreach ($element in $taskDoc.getNestedElements())
+  #set ($elementDoc = $taskDoc.getElementDoc($element))
+  #if ($elementDoc.getAntName() == 'FileSet')
+    #set ($hasExternalRefs = true)
+       <p class="taskNestedElementExternalRef">&rArr;&nbsp;<a 
href="http://ant.apache.org/manual/CoreTypes/fileset.html";>Ant's 
<code>fileset</code> type</a></p>
+  #elseif ($elementDoc.getAntName() == 'BasicDataSource')
+    #set ($hasExternalRefs = true)
+       <p class="taskNestedElementExternalRef">&rArr;&nbsp;<a 
href="http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html";><code>$element</code>
 (an object of type 
<code>org.apache.commons.dbcp.BasicDataSource</code>)</a></p>
+  #end
+#end
+#if ($hasExternalRefs)
+<div class="taskNestedElementSeparator"></div>
+#end
 #foreach ($element in $taskDoc.getNestedElements())
   #set ($elementDoc = $taskDoc.getElementDoc($element))
   #if ($elementDoc.sourceIncluded() && $elementDoc.isTagged())
-       <h4><a 
href="${elementDoc.getFullClassName()}.html"><strong>&lt;$element&gt; 
...</strong></a></h4>
-  #else
-       <h4><strong>&lt;$element&gt;</strong>#if 
(!$elementDoc.sourceIncluded()) (Of type ${elementDoc.getAntName()}) #end </h4>
-         #if($elementDoc.getComment())
-               <p>$elementDoc.getComment()</p>
-         #end
-               <strong>Parameters</strong>
-         #foreach ($attr in $elementDoc.attributes )
-               <h5>$attr</h5>
-               <table>
-                       <tr>
-                               <td><b>Type</b></td>
-                               <td>$elementDoc.getAttributeType($attr)</td>
-                       </tr>
-                       <tr>
-                               <td><b>Required?</b></td>
-                               <td>
-               #if ($elementDoc.getAttributeRequired($attr))
-                       <b>Yes</b> $elementDoc.getAttributeRequired($attr)
-               #elseif ($elementDoc.getAttributeNotRequired($attr))
-                       <b>No</b> $elementDoc.getAttributeNotRequired($attr)
-               #else
-                                       <i>unknown</i>
-               #end
-                               </td>
-                       </tr>
-               </table>
-               #if($elementDoc.getAttributeComment($attr))
-               <p>$elementDoc.getAttributeComment($attr)</p>
-               #end
-         #end
+       <p class="taskNestedElementRef">&rArr;&nbsp;<a 
href="${elementDoc.getFullClassName()}.html"><code>$element</code></a></p>
   #end
 #end
-               </div>
-    <br />
-       <hr />
-
-       <div class="copyright"><em>Generated with <a 
href="http://antdoclet.neuroning.com";>AntDoclet</a></em></div>
-
+</fieldset>
+<div class="copyright">Copyright &copy; 2005-2006 The Apache Software 
Foundation. All rights reserved.</div>
 </body>
 </html>


Reply via email to