You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by to...@apache.org on 2005/09/27 00:22:05 UTC

svn commit: r291766 - in /db/ddlutils/trunk: ./ lib/ src/doc/ src/doc/src/documentation/ src/doc/src/documentation/classes/ src/doc/src/documentation/content/xdocs/ src/java/org/apache/ddlutils/task/

Author: tomdz
Date: Mon Sep 26 15:13:18 2005
New Revision: 291766

URL: http://svn.apache.org/viewcvs?rev=291766&view=rev
Log:
Updated to newer Ant (1.6.5)
Updated to newer Forrest (0.7)
Updated ant task documentation

Added:
    db/ddlutils/trunk/lib/ant-1.6.5.jar   (with props)
    db/ddlutils/trunk/src/doc/src/documentation/sitemap.xmap
Removed:
    db/ddlutils/trunk/lib/ant-1.6.0.jar
Modified:
    db/ddlutils/trunk/.classpath
    db/ddlutils/trunk/ToDo.txt
    db/ddlutils/trunk/build.xml
    db/ddlutils/trunk/src/doc/forrest.properties
    db/ddlutils/trunk/src/doc/src/documentation/classes/CatalogManager.properties
    db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/ant-tasks.xml
    db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/documentation.xml
    db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/index.xml
    db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/site.xml
    db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/to-do.xml
    db/ddlutils/trunk/src/doc/src/documentation/skinconf.xml
    db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java

Modified: db/ddlutils/trunk/.classpath
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/.classpath?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/.classpath (original)
+++ db/ddlutils/trunk/.classpath Mon Sep 26 15:13:18 2005
@@ -8,10 +8,10 @@
 	<classpathentry kind="lib" path="lib/dom4j-1.4.jar"/>
 	<classpathentry kind="lib" path="lib/commons-beanutils-1.6.1.jar"/>
 	<classpathentry kind="lib" path="lib/commons-collections-3.1.jar"/>
-	<classpathentry kind="lib" path="lib/ant-1.6.0.jar"/>
 	<classpathentry kind="lib" path="lib/commons-dbcp-1.2.1.jar"/>
 	<classpathentry kind="lib" path="lib/commons-lang-2.0.jar"/>
 	<classpathentry kind="lib" path="lib/commons-digester-1.7.jar"/>
 	<classpathentry kind="lib" path="lib/commons-betwixt-0.7.jar"/>
+	<classpathentry kind="lib" path="lib/ant-1.6.5.jar"/>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: db/ddlutils/trunk/ToDo.txt
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/ToDo.txt?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/ToDo.txt (original)
+++ db/ddlutils/trunk/ToDo.txt Mon Sep 26 15:13:18 2005
@@ -2,7 +2,6 @@
 
 * Fix Javadoc errors
 * Enhance doc:
-    - The Ant task
     - How to use DdlUtils in code
 * Separate generation of alter statements for an existing databases from the reading
   of the model from the existing database to allow for alter statement generation with two
@@ -19,7 +18,6 @@
 * Extract interfaces from the model classes and inroduce a factory for creating the concrete model objects
 * Add functionality and ant tasks to dump data from the database
 * Add integration with DbUnit to allow DbUnit to use the schema and data files
-* Add proper handling of names (table, column, ...) that contain whitespaces and similar (-> escaping)
 * Add notion of jdbc types not directly supported by the database which are mapped to some large binary type,
   and add warnings when they are used (-> logging)
 * It might be useful to add support for the ARRAY jdbc data type in the way that PostgreSQL does, by

Modified: db/ddlutils/trunk/build.xml
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/build.xml?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/build.xml (original)
+++ db/ddlutils/trunk/build.xml Mon Sep 26 15:13:18 2005
@@ -96,7 +96,7 @@
         <fail unless="commons.resolver.available" message="Please make the Apache XML Commons Resolver library available in the classpath, e.g. by copying the xml-commons-resolver jar file from the 'tools/ant/lib' subdirectory of your Forrest installation (${env.FORREST_HOME}/tools/ant/lib) into the lib subdirectory of your Ant installation (${env.ANT_HOME}/lib)."/>
 
         <delete dir="${build.doc.dir}"
-        	    failonerror="false"/>
+        	      failonerror="false"/>
         <mkdir dir="${build.doc.dir}"/>
 
         <!-- Copy all forrest src stuff to a temporary directoy -->
@@ -116,17 +116,19 @@
             <fileset dir="${build.javadoc.dir}"/>
         </copy>
 
-    	<ant antfile="${env.FORREST_HOME}/forrest.build.xml"
-    		 dir="${build.doc.dir}"
-    		 inheritall="false"
-    		 target="site">
-    		<property name="forrest.home" value="${env.FORREST_HOME}"/>
-    	</ant>
+        <ant antfile="${env.FORREST_HOME}/main/forrest.build.xml"
+             dir="${build.doc.dir}"
+             inheritall="false"
+             target="site">
+            <property name="forrest.home" value="${env.FORREST_HOME}"/>
+        </ant>
         <!-- Finally we can copy the generated documentation to its designated place -->
+     <!-- 
         <mkdir dir="${doc.dir}"/>
         <copy todir="${doc.dir}">
             <fileset dir="${forrest.output.dir}"/>
         </copy>
+     -->
     </target>
 
     <!-- ================================================================== -->

Added: db/ddlutils/trunk/lib/ant-1.6.5.jar
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/lib/ant-1.6.5.jar?rev=291766&view=auto
==============================================================================
Binary file - no diff available.

Propchange: db/ddlutils/trunk/lib/ant-1.6.5.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: db/ddlutils/trunk/src/doc/forrest.properties
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/doc/forrest.properties?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/doc/forrest.properties (original)
+++ db/ddlutils/trunk/src/doc/forrest.properties Mon Sep 26 15:13:18 2005
@@ -1,4 +1,5 @@
-# Copyright 2002-2004 The Apache Software Foundation
+# Copyright 2002-2005 The Apache Software Foundation or its licensors,
+# as applicable.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,11 +15,11 @@
 
 ##############
 # Properties used by forrest.build.xml for building the website
-# These are the defaults, un-comment them if you need to change them.
+# These are the defaults, un-comment them only if you need to change them.
 ##############
 
 # Prints out a summary of Forrest settings for this project
-forrest.echo=true 
+#forrest.echo=true
 
 # Project name (used to name .war file)
 project.name=DdlUtils
@@ -28,8 +29,10 @@
 project.skin=tigris
 #project.skin=pelt
 
+# Descriptors for plugins and skins
 # comma separated list, file:// is supported
 #forrest.skins.descriptors=http://forrest.apache.org/skins/skins.xml,file:///c:/myskins/skins.xml
+#forrest.plugins.descriptors=http://forrest.apache.org/plugins/plugins.xml,http://forrest.apache.org/plugins/whiteboard-plugins.xml
 
 ##############
 # behavioural properties
@@ -88,18 +91,40 @@
 
 # The URL to start crawling from
 #project.start-uri=linkmap.html
+
 # Set logging level for messages printed to the console
 # (DEBUG, INFO, WARN, ERROR, FATAL_ERROR)
 #project.debuglevel=ERROR
+
 # Max memory to allocate to Java
 #forrest.maxmemory=64m
+
 # Any other arguments to pass to the JVM. For example, to run on an X-less
 # server, set to -Djava.awt.headless=true
 #forrest.jvmargs=
+
 # The bugtracking URL - the issue number will be appended
 #project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
 #project.bugtracking-url=http://issues.apache.org/jira/browse/
+
 # The issues list as rss
 #project.issues-rss-url=
-#I18n Property only works for the "forrest run" target.
+
+#I18n Property. Based on the locale request for the browser.
+#If you want to use it for static site then modify the JVM system.language
+# and run once per language
 #project.i18n=true
+
+# The names of plugins that are required to build the project
+# comma separated list (no spaces)
+# You can request a specific version by appending "-VERSION" to the end of
+# the plugin name. If you exclude a version number the latest released version
+# will be used, however, be aware that this may be a development version. In
+# a production environment it is recomended that you specify a known working 
+# version.
+# Run "forrest available-plugins" for a list of plug-ins currently available
+project.required.plugins=org.apache.forrest.plugin.output.pdf
+
+# Proxy configuration
+# proxy.host=
+# proxy.port=

Modified: db/ddlutils/trunk/src/doc/src/documentation/classes/CatalogManager.properties
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/doc/src/documentation/classes/CatalogManager.properties?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/doc/src/documentation/classes/CatalogManager.properties (original)
+++ db/ddlutils/trunk/src/doc/src/documentation/classes/CatalogManager.properties Mon Sep 26 15:13:18 2005
@@ -1,4 +1,5 @@
-# Copyright 2002-2004 The Apache Software Foundation
+# Copyright 2002-2005 The Apache Software Foundation or its licensors,
+# as applicable.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,25 +14,44 @@
 # limitations under the License.
 
 #=======================================================================
-# CatalogManager.properties
+# CatalogManager.properties for Catalog Entity Resolver.
 #
-# This is the default properties file for Apache Forrest.
+# This is the default properties file for your project.
 # This facilitates local configuration of application-specific catalogs.
+# If you have defined any local catalogs, then they will be loaded
+# before Forrest's core catalogs.
 #
 # See the Apache Forrest documentation:
 # http://forrest.apache.org/docs/your-project.html
 # http://forrest.apache.org/docs/validation.html
 
-# verbosity ... level of messages for status/debug
-# See forrest/src/core/context/WEB-INF/cocoon.xconf
+# verbosity:
+# The level of messages for status/debug (messages go to standard output).
+# The setting here is for your own local catalogs.
+# The verbosity of Forrest's core catalogs is controlled via
+#  main/webapp/WEB-INF/cocoon.xconf
+#
+# The following messages are provided ...
+#  0 = none
+#  1 = ? (... not sure yet)
+#  2 = 1+, Loading catalog, Resolved public, Resolved system
+#  3 = 2+, Catalog does not exist, resolvePublic, resolveSystem
+#  10 = 3+, List all catalog entries when loading a catalog
+#    (Cocoon also logs the "Resolved public" messages.)
+verbosity=1
 
 # catalogs ... list of additional catalogs to load
 #  (Note that Apache Forrest will automatically load its own default catalog
-#  from src/core/context/resources/schema/catalog.xcat)
-# use full pathnames
+#  from main/webapp/resources/schema/catalog.xcat)
+# Use either full pathnames or relative pathnames.
 # pathname separator is always semi-colon (;) regardless of operating system
 # directory separator is always slash (/) regardless of operating system
-#
-#catalogs=/home/me/forrest/my-site/src/documentation/resources/schema/catalog.xcat
-catalogs=
+catalogs=../resources/schema/catalog.xcat
 
+# relative-catalogs
+# If false, relative catalog URIs are made absolute with respect to the
+# base URI of the CatalogManager.properties file. This setting only 
+# applies to catalog URIs obtained from the catalogs property in the
+# CatalogManager.properties file
+# Example: relative-catalogs=[yes|no]
+relative-catalogs=no

Modified: db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/ant-tasks.xml
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/ant-tasks.xml?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/ant-tasks.xml (original)
+++ db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/ant-tasks.xml Mon Sep 26 15:13:18 2005
@@ -23,86 +23,98 @@
     <section>
       <title>DdlUtils' Ant tasks</title>
       <p>
-        DdlUtils comes with two <a href="ext:ant">Ant</a> tasks that allow you to create the
-        database structure, and to dump the database structure to XML, both from within your
-        build file.
+        DdlUtils comes with two <a href="ext:ant">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>
       <p>
         Lets see examples for how to use them:
       </p>
       <source><![CDATA[
 <path id="runtime.classpath">
-    <fileset dir="lib">
-        <include name="**/*.jar"/>
-        <include name="**/*.zip"/>
-    </fileset>
+  <fileset dir="lib">
+    <include name="**/*.jar"/>
+    <include name="**/*.zip"/>
+  </fileset>
 </path>
 
-<taskdef name="ddl"
-         classname="org.apache.ddlutils.task.DDLTask">
-  <classpath refid="runtime.classpath"/>
-</taskdef>
 
-<target name="database-setup" description="Creates database structure">
-  <ddl xmlFile="schema/schema.xml" 
-       targetDatabase="mysql"
-       output="target/schema.sql"
-       dbUrl="jdbc:mysql://localhost:3306/test"
-       dbUser="user"
-       dbPassword="pass"
-       dbDriver="com.mysql.jdbc.Driver"
-       alterDb="true"
-       executeSql="true"
-       modifyColumns="true"
-       doDrops="true"
-  />
+<target name="database-setup"
+        description="Creates the database structure and inserts data into the database">
+  <taskdef name="ddlToDatabase"
+           classname="org.apache.ddlutils.task.DdlToDatabaseTask">
+    <classpath refid="runtime-classpath"/>
+  </taskdef>
+  <ddlToDatabase>
+    <database url="jdbc:postgresql://localhost/test"
+              driverClassName="org.postgresql.Driver"
+              username="someuser"
+              password="somepassword"/>
+    <fileset dir="src/schema">
+      <include name="project-schema.xml"/>
+    </fileset>
+
+    <createDatabase failonerror="false"/>
+    <writeSchemaToDatabase/> 
+    <writeDataToDatabase datafile="src/data/data.xml"/> 
+  </ddlToDatabase>
 </target>]]></source>
       <p>
-        This snippet essentially uses the <code>DDLTask</code> to create the SQL necessary
-        to alter (attribute <code>alterDb</code>) the database schema of the existing MySQL
-        database at <code>localhost:3306/test</code> so that it matches the structure defined
-        in the file <code>schema/schema.xml</code>. This SQL is written to
-        <code>target/schema.sql</code> and then executed against the database (because of
-        attribute <code>executeSql</code>).
+        This snippet essentially uses the <code>DdlToDatabaseTask</code> task to create the a PostgreSQL
+        database at <code>//localhost/test</code>, establish the database structure (tables etc.)
+        defined in the file <code>src/schema/project-schema.xml</code> in this database, and then
+        inserts the data defined in <code>src/data/data.xml</code>.
       </p>
       <p>
         Required for this to work is that both DdlUtils and the JDBC driver are available
         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>
+      <note>
+        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="site:documentation/database-support">here</a>.
+      </note>
       <p>
-        The opposite direction is achieved via the <code>JdbcToSchemaTask</code> task:
+        The opposite direction is achieved via the <code>DatabaseToDdlTask</code> task:
       </p>
       <source><![CDATA[
 <path id="runtime.classpath">
-    <fileset dir="lib">
-        <include name="**/*.jar"/>
-        <include name="**/*.zip"/>
-    </fileset>
+  <fileset dir="lib">
+    <include name="**/*.jar"/>
+    <include name="**/*.zip"/>
+  </fileset>
 </path>
 
-<taskdef name="jdbc2Schema"
-         classname="org.apache.ddlutils.task.JdbcToSchemaTask">
-  <classpath refid="runtime.classpath"/>
-</taskdef>
-
 <target name="database-dump" description="Dumps the database structure">
-  <jdbc2Schema outputFile="schema/schema-dump.xml" 
-               dbUrl="jdbc:mysql://localhost:3306/test"
-               dbUser="user"
-               dbPassword="pass"
-               dbDriver="com.mysql.jdbc.Driver"
-  />
+  <taskdef name="databaseToDdl"
+           classname="org.apache.ddlutils.task.DatabaseToDdlTask">
+    <classpath refid="runtime-classpath"/>
+  </taskdef>
+  <databaseToDdl>
+    <database url="jdbc:derby:ddlutils"
+              driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+              username=""
+              password=""/>
+
+    <writeSchemaToFile outputFile="db-schema.xml"/>
+  </databaseToDdl>
 </target>]]></source>
       <p>
         Here, the database schema is retrieved via the specified JDBC driver and written
-        to the file <code>schema/schema-dump.xml</code>.
+        to the file <code>db-schema.xml</code>.
       </p>
     </section>
     <section>
-      <title>DDLTask reference</title>
+      <title>DdlToDatabaseTask reference</title>
+      <p>
+        Class name: <code>org.apache.ddlutils.task.DdlToDatabaseTask</code>
+      </p>
       <p>
-        Class name: <code>org.apache.ddlutils.task.DDLTask</code>
+        This is the container for sub tasks that operate in the direction file -> database, eg.
+        that create/drop a schema in the database, insert data into the database. They also
+        create DTDs for these data files, and dump the SQL for creating a schema in the database
+        to a file.
       </p>
       <table>
         <tr>
@@ -113,106 +125,378 @@
           <th>Meaning</th>
         </tr>
         <tr>
-          <td>alterDb</td>
-          <td>no</td>
-          <td>true, false</td>
-          <td>false</td>
-          <td>Whether the generated sql shall alter the database rather than replacing it
-              completely (which would result in the removal of all data already in the
-              tables). Note that this requires a database connection.</td>
-        </tr>
-        <tr>
-          <td>dbCatalog</td>
-          <td>no</td>
-          <td></td>
-          <td></td>
-          <td>The database catalog to use. This value depends on the database.</td>
-        </tr>
-        <tr>
-          <td>dbDriver</td>
-          <td>yes if <code>executeSql = true</code> or <code>alterDb = true</code></td>
-          <td></td>
-          <td></td>
-          <td>The fully qualified class name of the JDBC driver.</td>
-        </tr>
-        <tr>
-          <td>dbPassword</td>
-          <td>no</td>
-          <td></td>
-          <td></td>
-          <td>The password to use for the JDBC connection.</td>
-        </tr>
-        <tr>
-          <td>dbSchema</td>
-          <td>no</td>
-          <td></td>
-          <td></td>
-          <td>The schema in the database to use. This value depends on the database.</td>
-        </tr>
-        <tr>
-          <td>dbUrl</td>
-          <td>yes if <code>executeSql = true</code> or <code>alterDb = true</code></td>
-          <td></td>
-          <td></td>
-          <td>The JDBC connection url. This value depends on the used JDBC driver.</td>
-        </tr>
-        <tr>
-          <td>dbUser</td>
+          <td>schemaFile</td>
           <td>no</td>
           <td></td>
           <td></td>
-          <td>The user name to use for the JDBC connection.</td>
+          <td>
+            The single file that contains the database file. Use this instead of an embedded
+            <code>fileset</code> if you only have one schema file.
+          </td>
         </tr>
         <tr>
-          <td>doDrops</td>
+          <td>databaseType</td>
           <td>no</td>
-          <td>true, false</td>
-          <td>false</td>
-          <td>Whether drops shall be performed when modifying an existing database
-              (<code>alterDb = true</code>).</td>
-        </tr>
-        <tr>
-          <td>executeSql</td>
-          <td>no</td>
-          <td>true, false</td>
-          <td>false</td>
-          <td>Whether to execute the generated sql (which requires a database connection).</td>
-        </tr>
-        <tr>
-          <td>modifyColumns</td>
-          <td>no</td>
-          <td>true, false</td>
-          <td>false</td>
-          <td>Whether columns can be modified when chaning an existing database
-              (<code>alterDb = true</code>).</td>
-        </tr>
-        <tr>
-          <td>output</td>
-          <td>yes</td>
-          <td></td>
+          <td>
+            axion, cloudscape, db2, derby, firebird, hsqldb, interbase, maxdb, mckoi, mssql,
+            mysql, oracle, oracle9, postgresql, sapdb, sybase
+          </td>
           <td></td>
-          <td>The file to write the generated SQL to.</td>
-        </tr>
-        <tr>
-          <td>targetDatabase</td>
-          <td>yes</td>
-          <td>axion, cloudscape, db2, firebird, hsqldb, maxdb, mckoi, mssql, mysql, oracle, postgresql, sapdb, sybase</td>
-          <td></td>
-          <td>For which database to generate.</td>
-        </tr>
-        <tr>
-          <td>xmlFile</td>
-          <td>yes</td>
-          <td></td>
-          <td></td>
-          <td>The schema file containing the database definition.</td>
+          <td>
+            The database type. You should only need to specify this if DdlUtils is not able to
+            derive the setting from the name of the used jdbc driver or the jdbc connection url.
+            If you need to specify this, please post your jdbc driver and connection url combo
+            to the user mailing list so that DdlUtils can be enhanced to support this combo.
+          </td>
         </tr>
       </table>
+      <section>
+        <title>Subelement: fileset</title>
+        <p>
+          Specifies the schema files to operate with. For details see the
+          <a href="ext:ant/manual/coretypes/fileset">section in the Ant manual</a>.
+        </p>
+      </section>
+      <section>
+        <title>Subelement: dataSource</title>
+        <p>
+          Specifies the connection to the database. This is basically a
+          <code>org.apache.commons.dbcp.BasicDataSource</code>. See the
+          <a href="ext:jakarta/commons/dbcp/javadoc/">commons-dbcp Javadoc</a>
+          for the supported properties. Usually you only need to specify
+        </p>
+        <ul>
+          <li><code>url</code> - the jdbc connection url</li>
+          <li><code>driverClassName</code> - the fully qualified class name of the jdbc driver
+              (which must be in the classpath that you used to define the DdlToDatabaseTask task)</li>
+          <li><code>username</code> - the username</li>
+          <li><code>password</code> - the password</li>
+        </ul>
+      </section>
+      <section>
+        <title>Subtask: createDatabase</title>
+        <p>
+          The sub task for creating the target database. Note that this is only supported on some database
+          platforms. See <a href="site:documentation/database-support">here</a> for details on which
+          platforms support this.<br/>
+          This sub task does not require schema files. Therefore the <code>fileset</code> subelement and
+          the <code>schemaFile</code> attribute can be omitted.
+        </p>
+        <table>
+          <tr>
+            <th>Attribute</th>
+            <th>Required ?</th>
+            <th>Possible values</th>
+            <th>Default value</th>
+            <th>Meaning</th>
+          </tr>
+          <tr>
+            <td>failOnError</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>Specifies whether the execution shall stop if an error has occurred while the task runs.</td>
+          </tr>
+          <tr>
+            <td>useDelimitedSqlIdentifiers</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>
+              Whether DdlUtils shall use delimited (quoted) identifiers (table names, column names etc.)
+              In most databases, undelimited identifiers will be converted to uppercase by the database,
+              and the case of the identifier is ignored when performing any SQL command. Undelimited
+              identifiers can contain only alphanumerical characters and the underscore. Also, no reserved
+              words can be used as such identifiers.<br/>
+              The limitations do not exist for delimited identifiers. However case of the identifier will be
+              important in every SQL command executed against the database.
+            </td>
+          </tr>
+        </table>
+        <section>
+          <title>Subelement: parameter</title>
+          <p>
+            Specifies a parameter for the creation of the database. These are usually platform specific.
+          </p>
+          <table>
+            <tr>
+              <th>Attribute</th>
+              <th>Required ?</th>
+              <th>Possible values</th>
+              <th>Default value</th>
+              <th>Meaning</th>
+            </tr>
+            <tr>
+              <td>name</td>
+              <td>yes</td>
+              <td></td>
+              <td></td>
+              <td>Specifies the name of the parameter. See <a href="site:documentation/database-support">here</a>
+                  for the parameters supported by the individual platforms.</td>
+            </tr>
+            <tr>
+              <td>value</td>
+              <td>no</td>
+              <td></td>
+              <td></td>
+              <td>The parameter value. If none is given, <code>null</code> is used.</td>
+            </tr>
+            <tr>
+              <td>platforms</td>
+              <td>no</td>
+              <td></td>
+              <td></td>
+              <td>
+                Comma-separated list of platforms where the parameter shall be processed (see
+                <code>databaseType</code> attribute above for the possible values). For every platform
+                not in this list, the parameter is ignored. If none is given, then the parameter
+                is processed for every platform.
+              </td>
+            </tr>
+          </table>
+        </section>
+      </section>
+      <section>
+        <title>Subtask: dropDatabase</title>
+        <p>
+          The sub task for dropping the target database. Note that this is only supported on some database
+          platforms. See <a href="site:documentation/database-support">here</a> for details on which
+          platforms support this.<br/>
+          This sub task does not require schema files. Therefore the <code>fileset</code> subelement and
+          the <code>schemaFile</code> attribute can be omitted.
+        </p>
+        <table>
+          <tr>
+            <th>Attribute</th>
+            <th>Required ?</th>
+            <th>Possible values</th>
+            <th>Default value</th>
+            <th>Meaning</th>
+          </tr>
+          <tr>
+            <td>failOnError</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>useDelimitedSqlIdentifiers</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+        </table>
+      </section>
+      <section>
+        <title>Subtask: writeDtdToFile</title>
+        <p>
+          Creates a DTD that specifies the layout for data XML files.<br/>
+          This sub task does not require a database connection, so the <code>dataSource</code> subelement
+          can be omitted.
+        </p>
+        <table>
+          <tr>
+            <th>Attribute</th>
+            <th>Required ?</th>
+            <th>Possible values</th>
+            <th>Default value</th>
+            <th>Meaning</th>
+          </tr>
+          <tr>
+            <td>failOnError</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>outputFile</td>
+            <td>yes</td>
+            <td></td>
+            <td></td>
+            <td>The name of the file to write the DTD to.</td>
+          </tr>
+          <tr>
+            <td>useDelimitedSqlIdentifiers</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+        </table>
+      </section>
+      <section>
+        <title>Subtask: writeSchemaToDatabase</title>
+        <p>
+          Creates the schema in the database that is described by the schema XML files specified for
+          the enclosing task.
+        </p>
+        <table>
+          <tr>
+            <th>Attribute</th>
+            <th>Required ?</th>
+            <th>Possible values</th>
+            <th>Default value</th>
+            <th>Meaning</th>
+          </tr>
+          <tr>
+            <td>alterDatabase</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>Specifies whether DdlUtils shall alter existing tables rather than dropping them and
+                creating them new.</td>
+          </tr>
+          <tr>
+            <td>doDrops</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>
+              Whether tables and external constraints can be dropped if necessary. Note that this is also
+              relevant when <code>alterDatabase</code> is <code>true</code>. For instance, a table has a
+              foreign key constraint in the database but not in the schema. If <code>doDrops = true</code>
+              then DdlUtils will drop the constraint, otherwise it will be unchanged thus possibly leading
+              to unexpected errors.
+            </td>
+          </tr>
+          <tr>
+            <td>failOnError</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>useDelimitedSqlIdentifiers</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+        </table>
+      </section>
+      <section>
+        <title>Subtask: writeSchemaSqlToFile</title>
+        <p>
+          Creates the SQL commands necessary to create the schema in the database that is described by
+          the schema XML files specified for the enclosing task. Note that this subtask requires either
+          the specification of the data source in the enclosing task, or the use of the
+          <code>databaseType</code> attribute at the enclosing task.
+        </p>
+        <table>
+          <tr>
+            <th>Attribute</th>
+            <th>Required ?</th>
+            <th>Possible values</th>
+            <th>Default value</th>
+            <th>Meaning</th>
+          </tr>
+          <tr>
+            <td>alterDatabase</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>doDrops</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>failOnError</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>outputFile</td>
+            <td>yes</td>
+            <td></td>
+            <td></td>
+            <td>The name of the file to write the SQL commands to.</td>
+          </tr>
+          <tr>
+            <td>useDelimitedSqlIdentifiers</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+        </table>
+      </section>
+      <section>
+        <title>Subtask: writeDataToDatabase</title>
+        <p>
+          Inserts the data defined by the data XML file(s) into the database. This requires the schema
+          in the database to match the schema defined by the XML files specified at the enclosing task.
+        </p>
+        <p>
+          DdlUtils will honor the order imposed by the foreign keys. Ie. first all required entries are
+          inserted, then the dependent ones. Obviously this requires that no circular references exist
+          in the schema (DdlUtils currently does not check this).
+        </p>
+        <p>
+          In order to define data for foreign key dependencies that use auto-incrementing primary keys,
+          simply use unique values for their columns. DdlUtils will automatically use the real primary
+          key values. Note though that not every database supports the retrieval of auto-increment values.
+        </p>
+        <table>
+          <tr>
+            <th>Attribute</th>
+            <th>Required ?</th>
+            <th>Possible values</th>
+            <th>Default value</th>
+            <th>Meaning</th>
+          </tr>
+          <tr>
+            <td>failOnError</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>dataFile</td>
+            <td>no</td>
+            <td></td>
+            <td></td>
+            <td>The name of the single XML file that contains the data to insert into the database.</td>
+          </tr>
+          <tr>
+            <td>useDelimitedSqlIdentifiers</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+        </table>
+        <section>
+          <title>Subelement: fileset</title>
+          <p>
+            Specifies the XML files that contain the data to insert. DdlUtils processes them in the
+            order that they appear in the fileset(s). For details on the <code>FileSet</code> element
+            see the <a href="ext:ant/manual/coretypes/fileset">section in the Ant manual</a>.
+          </p>
+        </section>
+      </section>
     </section>
     <section>
-      <title>JdbcToSchemaTask reference</title>
+      <title>DatabaseToDdlTask reference</title>
+      <p>
+        Class name: <code>org.apache.ddlutils.task.DatabaseToDdlTask</code>
+      </p>
       <p>
-        Class name: <code>org.apache.ddlutils.task.JdbcToSchemaTask</code>
+        This is the container for sub tasks that operate in the direction database -> file, eg.
+        that create/drop a schema in the database, insert data into the database. They also
+        create DTDs for these data files, and dump the SQL for creating a schema in the database
+        to a file.
       </p>
       <table>
         <tr>
@@ -223,55 +507,157 @@
           <th>Meaning</th>
         </tr>
         <tr>
-          <td>dbCatalog</td>
+          <td>catalog</td>
           <td>no</td>
           <td></td>
-          <td></td>
-          <td>The database catalog to use. This value depends on the database.</td>
+          <td>%</td>
+          <td>
+            Specifies the catalog(s) to access. This is only necessary for some databases.
+            The pattern is that of
+            <a href="ext:java/api/databaseMetaData-getTables">java.sql.DatabaseMetaData#getTables</a>.
+            The special pattern '%' indicates that every catalog shall be used.
+          </td>
         </tr>
         <tr>
-          <td>dbDriver</td>
-          <td>yes</td>
-          <td></td>
-          <td></td>
-          <td>The fully qualified class name of the JDBC driver.</td>
-        </tr>
-        <tr>
-          <td>dbPassword</td>
+          <td>databaseType</td>
           <td>no</td>
+          <td>axion, cloudscape, db2, derby, firebird, hsqldb, interbase, maxdb, mckoi, mssql,
+              mysql, oracle, oracle9, postgresql, sapdb, sybase</td>
           <td></td>
-          <td></td>
-          <td>The password to use for the JDBC connection.</td>
+          <td>
+            The database type. You should only need to specify this if DdlUtils is not able to
+            derive the setting from the name of the used jdbc driver or the jdbc connection url.
+            If you need to specify this, please post your jdbc driver and connection url combo
+            to the user mailing list so that DdlUtils can be enhanced to support this combo.
+          </td>
         </tr>
         <tr>
-          <td>dbSchema</td>
+          <td>schema</td>
           <td>no</td>
           <td></td>
-          <td></td>
-          <td>The schema in the database to use. This value depends on the database.</td>
+          <td>%</td>
+          <td>
+            Specifies the table schema(s) to access. This is only necessary for some databases.
+            The pattern is that of
+            <a href="ext:java/api/databaseMetaData-getTables">java.sql.DatabaseMetaData#getTables</a>.
+            The special pattern '%' indicates that every table schema shall be used.
+          </td>
         </tr>
         <tr>
-          <td>dbUrl</td>
-          <td>yes</td>
-          <td></td>
-          <td></td>
-          <td>The JDBC connection url. This value depends on the used JDBC driver.</td>
-        </tr>
-        <tr>
-          <td>dbUser</td>
+          <td>tableTypes</td>
           <td>no</td>
           <td></td>
-          <td></td>
-          <td>The user name to use for the JDBC connection.</td>
-        </tr>
-        <tr>
-          <td>outputFile</td>
-          <td>yes</td>
-          <td></td>
-          <td></td>
-          <td>The file to write the schema to.</td>
+          <td>TABLE</td>
+          <td>
+            Specifies the table types to processed.
+            For details and typical table types see
+            <a href="ext:java/api/databaseMetaData-getTables">java.sql.DatabaseMetaData#getTables</a>.
+            Per default, only tables of type <code>TABLE</code>, eg. user tables, are processed.
+          </td>
         </tr>
       </table>
+      <section>
+        <title>Subelement: dataSource</title>
+        <p>
+          Specifies the connection to the database. This is basically a
+          <code>org.apache.commons.dbcp.BasicDataSource</code>. See the
+          <a href="ext:jakarta/commons/dbcp/javadoc/">commons-dbcp Javadoc</a>
+          for the supported properties. Usually you only need to specify
+        </p>
+        <ul>
+          <li><code>url</code> - the jdbc connection url</li>
+          <li><code>driverClassName</code> - the fully qualified class name of the jdbc driver
+              (which must be in the classpath that you used to define the DdlToDatabaseTask task)</li>
+          <li><code>username</code> - the username</li>
+          <li><code>password</code> - the password</li>
+        </ul>
+      </section>
+      <section>
+        <title>Subtask: writeDtdToFile</title>
+        <p>
+          Same as for the <code>DdlToDatabaseTask</code> task.
+        </p>
+      </section>
+      <section>
+        <title>Subtask: writeSchemaToFile</title>
+        <p>
+          Dumps the schema in the database to a schema XML file.
+        </p>
+        <table>
+          <tr>
+            <th>Attribute</th>
+            <th>Required ?</th>
+            <th>Possible values</th>
+            <th>Default value</th>
+            <th>Meaning</th>
+          </tr>
+          <tr>
+            <td>outputFile</td>
+            <td>yes</td>
+            <td></td>
+            <td></td>
+            <td>The name of the file to write the schema XML to.</td>
+          </tr>
+        </table>
+      </section>
+      <section>
+        <title>Subtask: writeSchemaSqlToFile</title>
+        <p>
+          Creates the SQL commands necessary to re-create the schema in the database. In contrast to the
+          sub task of the same name in the <code>DdlToDatabaseTask</code>, this sub task operates on the
+          schema in the database.
+        </p>
+        <table>
+          <tr>
+            <th>Attribute</th>
+            <th>Required ?</th>
+            <th>Possible values</th>
+            <th>Default value</th>
+            <th>Meaning</th>
+          </tr>
+          <tr>
+            <td>alterDatabase</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>doDrops</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>failOnError</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+          <tr>
+            <td>outputFile</td>
+            <td>yes</td>
+            <td></td>
+            <td></td>
+            <td>The name of the file to write the SQL commands to.</td>
+          </tr>
+          <tr>
+            <td>useDelimitedSqlIdentifiers</td>
+            <td>no</td>
+            <td>true,false</td>
+            <td>true</td>
+            <td>See above.</td>
+          </tr>
+        </table>
+      </section>
+      <section>
+        <title>Subtask: writeDataToDatabase</title>
+        <p>
+          Same as for the <code>DdlToDatabaseTask</code> task.
+        </p>
+      </section>
     </section>
   </body>
 </document>

Modified: db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/documentation.xml
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/documentation.xml?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/documentation.xml (original)
+++ db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/documentation.xml Mon Sep 26 15:13:18 2005
@@ -17,12 +17,40 @@
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
 <document> 
   <header> 
-    <title>Summary</title> 
+    <title>Overview</title> 
   </header> 
   <body> 
     <section>
       <title>What is DdlUtils</title>
-      <note>Coming soon</note>
+      <p>
+        In short, DdlUtils is both a library and a set of <a href="ext:ant">Ant</a> tasks that allows
+        the manipulation of schemas in a database. It allows to create and drop complete databases,
+        and the creation, alteration and removal of tables.<br/>
+        Additionally, it provides an easy way to insert data that is specified in XML, into a database
+        and the reverse, extracting data from a database into an XML file.
+      </p>
+      <p>
+        DdlUtils strives to be database independent. The schemas are specified in the database-agnostic
+        Turbine XML format that is for instance also used by <a href="ext:torque">Torque</a> and
+        <a href="ext:ojb">OJB</a>.
+      </p>
+    </section>
+    <section>
+      <title>Where to start</title>
+      <p>
+        There are basically two ways to use  DdlUtils which are explained in these sections:
+      </p>
+      <ul>
+        <li>
+          Examples of how to use the <strong>API</strong> are shown
+          <a href="site:documentation/api-usage">here</a>. The Javadoc documentation for the API can be
+          found <a href="ext:ddlutils/javadoc">here</a>.
+        </li>
+        <li>
+          The <strong>Ant tasks</strong> are explained in detail in
+          <a href="site:documentation/ant-tasks">this document</a>.
+        </li>
+      </ul>
     </section>
   </body>
 </document>

Modified: db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/index.xml?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/index.xml (original)
+++ db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/index.xml Mon Sep 26 15:13:18 2005
@@ -91,7 +91,7 @@
       <ul>
         <li>
           In an <a href="ext:ant">Ant</a> build script via the task provided by DdlUtils.
-          You can learn more about <a href="site:documentation/ant-task">here</a>.
+          You can learn more about <a href="site:documentation/ant-tasks">here</a>.
         </li>
         <li>
           From within your Java program, about which you can learn more 

Modified: db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/site.xml?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/site.xml (original)
+++ db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/site.xml Mon Sep 26 15:13:18 2005
@@ -78,7 +78,13 @@
       </dev-list>
     </ddlutils>
 
-    <ant href="http://ant.apache.org/"/>
+    <ant href="http://ant.apache.org/">
+      <manual href="manual/">
+        <coretypes href="CoreTypes/">
+          <fileset href="fileset.html"/>
+        </coretypes>
+      </manual>
+    </ant>
     <axion href="http://axion.tigris.org/">
       <datatypes href="datatypes.html"/>
     </axion>
@@ -101,6 +107,13 @@
     </hsqldb>
     <idea href="http://www.jetbrains.com/idea"/>
     <interbase href="http://www.borland.com/interbase/"/>
+    <jakarta href="http://jakarta.apache.org/">
+      <commons href="commons/">
+        <dbcp href="dbcp/">
+          <javadoc href="apidocs/"/>
+        </dbcp>
+      </commons>
+    </jakarta>
     <java href="http://java.sun.com/">
       <jdbc>
         <guide href="http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/GettingStartedTOC.fm.html">
@@ -108,6 +121,9 @@
         </guide>
         <spec href="http://java.sun.com/products/jdbc/download.html"/>
       </jdbc>
+      <api href="j2se/1.4.2/docs/api/">
+        <databaseMetaData-getTables href="java/sql/DatabaseMetaData.html#getTables(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String[])"/>
+      </api>
     </java>
     <maxdb href="http://www.mysql.com/products/maxdb/">
       <manual href="http://dev.mysql.com/get/Downloads/MaxDB/7.5.00/maxdb-chmdoc-75.chm/from/pick"/>

Modified: db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/to-do.xml
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/to-do.xml?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/to-do.xml (original)
+++ db/ddlutils/trunk/src/doc/src/documentation/content/xdocs/to-do.xml Mon Sep 26 15:13:18 2005
@@ -22,6 +22,7 @@
   <body> 
     <section id="ToDo">
       <title>ToDo</title>
+      <p></p>
       <source><![CDATA[@@content@@]]></source>
     </section>
   </body>

Added: db/ddlutils/trunk/src/doc/src/documentation/sitemap.xmap
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/doc/src/documentation/sitemap.xmap?rev=291766&view=auto
==============================================================================
--- db/ddlutils/trunk/src/doc/src/documentation/sitemap.xmap (added)
+++ db/ddlutils/trunk/src/doc/src/documentation/sitemap.xmap Mon Sep 26 15:13:18 2005
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:components>
+    <map:actions>
+      <map:action logger="sitemap.action.sourcetype" name="sourcetype" src="org.apache.forrest.sourcetype.SourceTypeAction">
+        <sourcetype name="hello-v1.0">
+          <document-declaration public-id="-//Acme//DTD Hello Document V1.0//EN" />
+        </sourcetype>
+      </map:action>
+    </map:actions>   
+    
+    <map:selectors default="parameter">
+	    <map:selector logger="sitemap.selector.parameter" name="parameter" src="org.apache.cocoon.selection.ParameterSelector" />
+    </map:selectors>
+  </map:components>
+  
+  <map:resources>    
+    <map:resource name="transform-to-document">
+      <map:act type="sourcetype" src="{src}">
+        <map:select type="parameter">
+          <map:parameter name="parameter-selector-test" value="{sourcetype}" />
+
+          <map:when test="hello-v1.0">
+            <map:generate src="{project:content.xdocs}{../../1}.xml" />
+            <map:transform src="{project:resources.stylesheets}/hello2document.xsl" />
+            <map:serialize type="xml-document"/>
+          </map:when>
+        </map:select>
+      </map:act>
+    </map:resource>
+  </map:resources>
+  
+ <map:pipelines>
+  <map:pipeline>
+    <map:match pattern="old_site/*.html">
+     <map:select type="exists">
+      <map:when test="{project:content}{1}.html">
+        <map:read src="{project:content}{1}.html" mime-type="text/html"/>
+        <!--
+          Use this instead if you want JTidy to clean up your HTML
+          <map:generate type="html" src="{project:content}/{0}" />
+          <map:serialize type="html"/>
+        -->
+      </map:when>
+     </map:select>
+   </map:match>
+  
+   <map:match pattern="**.xml">
+      <map:call resource="transform-to-document">
+        <map:parameter name="src" value="{project:content.xdocs}{1}.xml" />
+      </map:call>
+    </map:match>
+  </map:pipeline>
+ </map:pipelines>
+</map:sitemap>

Modified: db/ddlutils/trunk/src/doc/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/doc/src/documentation/skinconf.xml?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/doc/src/documentation/skinconf.xml (original)
+++ db/ddlutils/trunk/src/doc/src/documentation/skinconf.xml Mon Sep 26 15:13:18 2005
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-15"?>
 <!--
-  Copyright 2002-2004 The Apache Software Foundation
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -20,7 +21,7 @@
 which will be used to configure the chosen Forrest skin.
 -->
 
-<!DOCTYPE skinconfig PUBLIC "-//APACHE//DTD Skin Configuration V0.6-3//EN" "http://forrest.apache.org/dtd/skinconfig-v06-3.dtd">
+<!DOCTYPE skinconfig PUBLIC "-//APACHE//DTD Skin Configuration V0.7-1//EN" "http://forrest.apache.org/dtd/skinconfig-v07-1.dtd">
 <skinconfig>
   <!-- To enable lucene search add provider="lucene" (default is google).
     Add box-location="alt" to move the search box to an alternate location
@@ -101,9 +102,13 @@
   <!-- Some skins use this to form a 'breadcrumb trail' of links.
     Use location="alt" to move the trail to an alternate location
     (if the skin supports it).
-	  Omit the location attribute to display the trail in the default location.
-	  Use location="none" to not display the trail (if the skin supports it).
+    Omit the location attribute to display the trail in the default location.
+    Use location="none" to not display the trail (if the skin supports it).
     For some skins just set the attributes to blank.
+    
+    NOTE: If a breadcrumb entry points at a local file the href must
+    be complete, that is it must point to the file itself, not to a 
+    directory.
   -->
   <trail>
     <link1 name="apache.org" href="http://www.apache.org/"/>
@@ -133,14 +138,47 @@
     href="mailto:webmaster@foo.com?subject=Feedback&#160;" >
     Send feedback about the website to:
   </feedback>-->
+
+  <!-- Optional message of the day (MOTD).
+    Note: This is only implemented in the pelt skin.
+    If the optional <motd> element is used, then messages will be appended
+    depending on the URI string pattern.
+    motd-option : Specifies a pattern to match and provides small text content.
+    motd-title : This text will be added in brackets after the <html><title>
+    motd-page : This text will be added in a panel on the face of the page,
+    with the "motd-page-url" being the hyperlink "More".
+    Values for the "location" attribute are:
+      page : on the face of the page, e.g. in the spare space of the toc
+      alt : at the bottom of the left-hand navigation panel
+      both : both
+    -->
+<!--
+  <motd>
+    <motd-option pattern="docs_0_80">
+      <motd-title>v0.8-dev</motd-title>
+      <motd-page location="both">
+        This is documentation for development version v0.8
+      </motd-page>
+      <motd-page-url>/versions/index.html</motd-page-url>
+    </motd-option>
+    <motd-option pattern="docs_0_70">
+      <motd-title>v0.7</motd-title>
+      <motd-page location="both">
+        This is documentation for current version v0.7
+      </motd-page>
+      <motd-page-url>/versions/index.html</motd-page-url>
+    </motd-option>
+  </motd>
+-->
+
   <!--
     extra-css - here you can define custom css-elements that are 
-    a. overriding the fallback elements or 
-    b. adding the css definition from new elements that you may have 
+    A) overriding the fallback elements or 
+    B) adding the css definition from new elements that you may have 
        used in your documentation.
     -->
   <extra-css>
-    <!--Example of b. 
+    <!--Example of reason B:
         To define the css definition of a new element that you may have used
         in the class attribute of a <p> node. 
         e.g. <p class="quote"/>
@@ -183,9 +221,62 @@
   </extra-css>
 
   <colors>
-  <!-- These values are used for the generated CSS files. -->
+  <!-- These values are used for the generated CSS files.
+    They essentially "override" the default colors defined in the chosen skin.
+    There are four duplicate "groups" of colors below, denoted by comments:
+      Color group: Forrest, Krysalis, Collabnet, and Lenya using Pelt.
+    They are provided for example only. To customize the colors of any skin,
+    uncomment one of these groups of color elements and change the values
+    of the particular color elements that you wish to change.
+    Note that by default, all color groups are commented-out which means that
+    the default colors provided by the skin are being used.
+  -->
 
-  <!-- Krysalis -->
+  <!-- Color group: Forrest: example colors similar to forrest.apache.org
+    Some of the element names are obscure, so comments are added to show how
+    the "pelt" skin uses them, other skins might use these elements in a different way.
+    Tip: temporarily change the value of an element to red (#ff0000) and see the effect.
+     pelt: breadtrail: the strip at the top of the page and the second strip under the tabs
+     pelt: header: top strip containing project and group logos
+     pelt: heading|subheading: section headings within the content
+     pelt: navstrip: the strip under the tabs which contains the published date
+     pelt: menu: the left-hand navigation panel
+     pelt: toolbox: the selected menu item
+     pelt: searchbox: the background of the searchbox
+     pelt: border: line border around selected menu item
+     pelt: body: any remaining parts, e.g. the bottom of the page
+     pelt: footer: the second from bottom strip containing credit logos and published date
+     pelt: feedback: the optional bottom strip containing feedback link
+  -->
+<!--
+    <color name="breadtrail" value="#cedfef" font="#0F3660" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="header" value="#294563"/>
+    <color name="tab-selected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="tab-unselected" value="#b5c7e7" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="subtab-selected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="subtab-unselected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="heading" value="#294563"/>
+    <color name="subheading" value="#4a6d8c"/>
+    <color name="published" value="#4C6C8F" font="#FFFFFF"/>
+    <color name="feedback" value="#4C6C8F" font="#FFFFFF" align="center"/>
+    <color name="navstrip" value="#4a6d8c" font="#ffffff" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
+    <color name="menu" value="#4a6d8c" font="#cedfef" link="#ffffff" vlink="#ffffff" hlink="#ffcf00"/>    
+    <color name="toolbox" value="#4a6d8c"/>
+    <color name="border" value="#294563"/>
+    <color name="dialog" value="#4a6d8c"/>
+    <color name="searchbox" value="#4a6d8c" font="#000000"/>
+    <color name="body" value="#ffffff" link="#0F3660" vlink="#009999" hlink="#000066"/>
+    <color name="table" value="#7099C5"/>    
+    <color name="table-cell" value="#f0f0ff"/>    
+    <color name="highlight" value="#ffff00"/>
+    <color name="fixme" value="#cc6600"/>
+    <color name="note" value="#006699"/>
+    <color name="warning" value="#990000"/>
+    <color name="code" value="#CFDCED"/>
+    <color name="footer" value="#cedfef"/>
+-->
+
+  <!-- Color group: Krysalis -->
 <!--
     <color name="header"    value="#FFFFFF"/>
 
@@ -216,40 +307,8 @@
         
     <color name="footer" value="#a5b6c6"/>
 -->
-  
-  <!-- Forrest -->
-<!--
-    <color name="header"    value="#294563"/>
-
-    <color name="tab-selected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
-    <color name="tab-unselected" value="#b5c7e7" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
-    <color name="subtab-selected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
-    <color name="subtab-unselected" value="#4a6d8c" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
 
-    <color name="heading" value="#294563"/>
-    <color name="subheading" value="#4a6d8c"/>
-        
-    <color name="navstrip" value="#cedfef" font="#0F3660" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
-    <color name="toolbox" value="#4a6d8c"/>
-    <color name="border" value="#294563"/>
-    
-    <color name="menu" value="#4a6d8c" font="#cedfef" link="#ffffff" vlink="#ffffff" hlink="#ffcf00"/>    
-    <color name="dialog" value="#4a6d8c"/>
-            
-    <color name="body" value="#ffffff"  link="#0F3660" vlink="#009999" hlink="#000066"/>
-    
-    <color name="table" value="#7099C5"/>    
-    <color name="table-cell" value="#f0f0ff"/>    
-    <color name="highlight" value="#ffff00"/>
-    <color name="fixme" value="#cc6600"/>
-    <color name="note" value="#006699"/>
-    <color name="warning" value="#990000"/>
-    <color name="code" value="#CFDCED"/>
-        
-    <color name="footer" value="#cedfef"/>
--->
-
-  <!-- Collabnet --> 
+  <!-- Color group: Collabnet --> 
 <!--
     <color name="header"    value="#003366"/>
 
@@ -280,39 +339,35 @@
         
     <color name="footer" value="#ffffff"/>
 -->
- <!-- Lenya using pelt-->
+ <!-- Color group: Lenya using pelt-->
 <!--
+
     <color name="header" value="#ffffff"/>
 
-    <color name="tab-selected" value="#4C6C8F" link="#ffffff" vlink="#ffffff" hlink="#ffffff"/>
-    <color name="tab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
+    <color name="tab-selected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
+    <color name="tab-unselected" value="#F5F4E9" link="#000000" vlink="#000000" hlink="#000000"/>
     <color name="subtab-selected" value="#000000" link="#000000" vlink="#000000" hlink="#000000"/>
     <color name="subtab-unselected" value="#E5E4D9" link="#000000" vlink="#000000" hlink="#000000"/>
 
     <color name="heading" value="#E5E4D9"/>
     <color name="subheading" value="#000000"/>
-    <color name="published" value="#4C6C8F" font="#FFFFFF"/>
-    <color name="feedback" value="#4C6C8F" font="#FFFFFF" align="center"/>
+    <color name="published" value="#000000"/>
     <color name="navstrip" value="#E5E4D9" font="#000000"/>
-
     <color name="toolbox" value="#CFDCED" font="#000000"/>
-
     <color name="border" value="#999999"/>
-    <color name="menu" value="#4C6C8F" font="#ffffff" link="#ffffff" vlink="#ffffff" hlink="#ffffff" current="#FFCC33" />    
-    <color name="menuheading" value="#cfdced" font="#000000" />
-    <color name="searchbox" value="#E5E4D9" font="#000000"/>
-    
+
+    <color name="menu" value="#E5E4D9" font="#000000" link="#000000" vlink="#000000" hlink="#000000"/>
     <color name="dialog" value="#CFDCED"/>
-    <color name="body" value="#ffffff" />            
-    
-    <color name="table" value="#ccc"/>    
-    <color name="table-cell" value="#ffffff"/>   
+    <color name="body" value="#ffffff" />
+
+    <color name="table" value="#ccc"/>
+    <color name="table-cell" value="#ffffff"/>
     <color name="highlight" value="#ffff00"/>
     <color name="fixme" value="#cc6600"/>
     <color name="note" value="#006699"/>
     <color name="warning" value="#990000"/>
     <color name="code" value="#003366"/>
-        
+
     <color name="footer" value="#E5E4D9"/>
 -->
   </colors>
@@ -328,6 +383,20 @@
     -->
     <page size="a4" orientation="portrait" text-align="left"/>
 
+    <!-- 
+       Pattern of the page numbering in the footer - Default is "Page x".
+       first occurrence of '1' digit represents the current page number,
+       second occurrence of '1' digit represents the total page number,
+       anything else is considered as the static part of the numbering pattern.
+       Examples : x is the current page number, y the total page number.
+       <page-numbering-format>none</page-numbering-format> Do not displays the page numbering
+       <page-numbering-format>1</page-numbering-format> Displays "x"
+       <page-numbering-format>p1.</page-numbering-format> Displays "px."
+       <page-numbering-format>Page 1/1</page-numbering-format> Displays "Page x/y"
+       <page-numbering-format>(1-1)</page-numbering-format> Displays "(x-y)"
+    -->
+    <page-numbering-format>Page 1</page-numbering-format>
+
     <!--
        Margins can be specified for top, bottom, inner, and outer
        edges. If double-sided="false", the inner edge is always left
@@ -357,11 +426,24 @@
     <disable-copyright-footer>false</disable-copyright-footer>
   </pdf>
 
-  <!-- Credits are typically rendered as a set of small clickable
+  <!-- 
+    Credits are typically rendered as a set of small clickable
     images in the page footer.
-    Use box-location="alt" to move the credit to an alternate location
-    (if the skin supports it). 
-  -->
+    
+    Use box-location="alt" to move the credits to an alternate location
+    (if the skin supports it).
+
+    For example, pelt skin:
+    - box-location="alt" will place the logo at the end of the
+      left-hand coloured menu panel.
+    - box-location="alt2" will place them underneath that panel
+      in the left-hand whitespace.
+    - Otherwise they are placed next to the compatibility icons
+      at the bottom of the screen.
+
+    Comment out the whole <credit>-element if you want no credits in the
+    web pages  
+   -->
   <credits>
       <credit box-location="alt">
             <name>Ant</name>
@@ -379,13 +461,13 @@
             <height>30</height>
         </credit>
 
-        <credit box-location="alt">
-            <name>Built with Apache Forrest</name>
-            <url>http://forrest.apache.org/</url>
-            <image>images/forrest-logo.png</image>
-            <width>88</width>
-            <height>31</height>
-        </credit>
+    <credit box-location="alt">
+      <name>Built with Apache Forrest</name>
+      <url>http://forrest.apache.org/</url>
+      <image>images/built-with-forrest-button.png</image>
+      <width>88</width>
+      <height>31</height>
+    </credit>
     <!-- A credit with @role="pdf" will be used to compose a footer
      for each page in the PDF, using either "name" or "url" or both.
     -->

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java Mon Sep 26 15:13:18 2005
@@ -37,8 +37,8 @@
     private File _outputFile;
     /** Whether to alter or re-set the database if it already exists */
     private boolean _alterDb = true;
-    /** Whether to drop tables and the associated constraints first */
-    private boolean _dropTablesFirst = true;
+    /** Whether to drop tables and the associated constraints if necessary */
+    private boolean _doDrops = true;
 
     /**
      * Sets the file to output the sql to.
@@ -71,23 +71,23 @@
     }
 
     /**
-     * Determines whether to drop tables and the associated constraints first.
+     * Determines whether to drop tables and the associated constraints if necessary.
      * 
-     * @return <code>true</code> if a drop shall be performed first
+     * @return <code>true</code> if drops shall be performed if necessary
      */
-    protected boolean isDropTablesFirst()
+    protected boolean isDoDrops()
     {
-        return _dropTablesFirst;
+        return _doDrops;
     }
 
     /**
-     * Specifies whether to drop tables and the associated constraints first.
+     * Specifies whether to drop tables and the associated constraints if necessary.
      * 
-     * @param doDrops <code>true</code> if a drop shall be performed first
+     * @param doDrops <code>true</code> if drops shall be performed if necessary
      */
-    public void setDropTablesFirst(boolean doDrops)
+    public void setDoDrops(boolean doDrops)
     {
-        _dropTablesFirst = doDrops;
+        _doDrops = doDrops;
     }
 
     /* (non-Javadoc)
@@ -122,11 +122,11 @@
 
                 Database currentModel = new JdbcModelReader(connection).getDatabase();
 
-                platform.getSqlBuilder().alterDatabase(currentModel, model, _dropTablesFirst, true);
+                platform.getSqlBuilder().alterDatabase(currentModel, model, _doDrops, true);
             }
             else
             {
-                platform.getSqlBuilder().createTables(model, _dropTablesFirst);
+                platform.getSqlBuilder().createTables(model, _doDrops);
             }
             writer.close();
             task.log("Written SQL to "+_outputFile.getAbsolutePath(), Project.MSG_INFO);

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java?rev=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java Mon Sep 26 15:13:18 2005
@@ -29,8 +29,8 @@
 {
     /** Whether to alter or re-set the database if it already exists */
     private boolean _alterDb = true;
-    /** Whether to drop tables and the associated constraints first */
-    private boolean _dropTablesFirst = true;
+    /** Whether to drop tables and the associated constraints if necessary */
+    private boolean _doDrops = true;
 
     /**
      * Determines whether to alter the database if it already exists, or re-set it.
@@ -53,23 +53,23 @@
     }
 
     /**
-     * Determines whether to drop tables and the associated constraints first.
+     * Determines whether to drop tables and the associated constraints if necessary.
      * 
-     * @return <code>true</code> if a drop shall be performed first
+     * @return <code>true</code> if drops shall be performed
      */
-    protected boolean isDropTablesFirst()
+    protected boolean isDoDrops()
     {
-        return _dropTablesFirst;
+        return _doDrops;
     }
 
     /**
-     * Specifies whether to drop tables and the associated constraints first.
+     * Specifies whether to drop tables and the associated constraints if necessary.
      * 
-     * @param doDrops <code>true</code> if a drop shall be performed first
+     * @param doDrops <code>true</code> if drops shall be performed
      */
-    public void setDropTablesFirst(boolean doDrops)
+    public void setDoDrops(boolean doDrops)
     {
-        _dropTablesFirst = doDrops;
+        _doDrops = doDrops;
     }
 
     /* (non-Javadoc)
@@ -88,11 +88,11 @@
         {
             if (isAlterDatabase())
             {
-                platform.alterTables(model, _dropTablesFirst, true, true);
+                platform.alterTables(model, _doDrops, true, true);
             }
             else
             {
-                platform.createTables(model, _dropTablesFirst, true);
+                platform.createTables(model, _doDrops, true);
             }
 
             task.log("Written schema to database", Project.MSG_INFO);