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 @@ - + + + + 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 @@ - $title - - - - +$title + -

$title - Documentation

-

DdlUtils comes with two Ant 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.

-

Using the Tasks

-

Lets see examples for how to use them:

@@ -72,15 +59,13 @@ in the path specified by runtime-classpath. In the above snippet, this path contains all JARs and ZIPs in sub-directory lib.

-
-

-Note -

+
+Note

Not every database platform supports creation of new databases via JDBC. Please refer to the documentation of the support for the individual databases here.

-
+

The opposite direction is achieved via the DatabaseToDdlTask task:

@@ -115,20 +100,14 @@ to the file db-schema.xml. Likewise, the data in the database is written to the file data.xml.

- -

Requirements

The DdlUtils tasks require Ant version 1.5 or newer.

-

Reference

The tasks reference documentation can be found here.

- - - 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 @@ <$taskDoc.getAntName()> - +

#if( $taskDoc.getAnyCategory().length() > 0 ) $!taskDoc.getAntCategory() : #end $taskDoc.getAntName()

-

Type

-

$taskDoc.getFullClassName()

-

Description

+
+Description +

Java type: $taskDoc.getFullClassName()

$taskDoc.getComment()

-

Parameters

+
+
+Parameters #foreach ($attr in $taskDoc.attributes ) -

$attr

- - - - - - - - - -
Type$taskDoc.getAttributeType($attr)
Required? + #if ($velocityCount > 1)
#end +

+ $attr : $taskDoc.getAttributeType($attr) + #if ($taskDoc.getAttributeRequired($attr)) (required) #end +

+

+ $taskDoc.getAttributeComment($attr)
#if ($taskDoc.getAttributeRequired($attr)) - Yes $taskDoc.getAttributeRequired($attr) + $taskDoc.getAttributeRequired($attr) #elseif ($taskDoc.getAttributeNotRequired($attr)) - No $taskDoc.getAttributeNotRequired($attr) - #else - unknown + $taskDoc.getAttributeNotRequired($attr) #end -

-

$taskDoc.getAttributeComment($attr)

+

#end -

Nested elements

+
+
+Nested elements #if ($taskDoc.isTaskContainer())

This Task is a Container (it accepts nested Tasks).

#end #if ($taskDoc.supportsCharacters())

This Task accepts text in its element body.

#end +#set ($hasExternalRefs = false) +#foreach ($element in $taskDoc.getNestedElements()) + #set ($elementDoc = $taskDoc.getElementDoc($element)) + #if ($elementDoc.getAntName() == 'FileSet') + #set ($hasExternalRefs = true) +

⇒ Ant's fileset type

+ #elseif ($elementDoc.getAntName() == 'BasicDataSource') + #set ($hasExternalRefs = true) +

⇒ $element (an object of type org.apache.commons.dbcp.BasicDataSource)

+ #end +#end +#if ($hasExternalRefs) +
+#end #foreach ($element in $taskDoc.getNestedElements()) #set ($elementDoc = $taskDoc.getElementDoc($element)) #if ($elementDoc.sourceIncluded() && $elementDoc.isTagged()) -

<$element> ...

- #else -

<$element>#if (!$elementDoc.sourceIncluded()) (Of type ${elementDoc.getAntName()}) #end

- #if($elementDoc.getComment()) -

$elementDoc.getComment()

- #end - Parameters - #foreach ($attr in $elementDoc.attributes ) -
$attr
- - - - - - - - - -
Type$elementDoc.getAttributeType($attr)
Required? - #if ($elementDoc.getAttributeRequired($attr)) - Yes $elementDoc.getAttributeRequired($attr) - #elseif ($elementDoc.getAttributeNotRequired($attr)) - No $elementDoc.getAttributeNotRequired($attr) - #else - unknown - #end -
- #if($elementDoc.getAttributeComment($attr)) -

$elementDoc.getAttributeComment($attr)

- #end - #end +

⇒ $element

#end #end - -
-
- - - +
+