db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r650023 [1/6] - in /db/ddlutils/trunk/src: java/ java/org/apache/ddlutils/io/ schema/ test/org/apache/ddlutils/ test/org/apache/ddlutils/alteration/ test/org/apache/ddlutils/dynabean/ test/org/apache/ddlutils/io/ test/org/apache/ddlutils/pl...
Date Mon, 21 Apr 2008 06:15:25 GMT
Author: tomdz
Date: Sun Apr 20 23:15:21 2008
New Revision: 650023

URL: http://svn.apache.org/viewvc?rev=650023&view=rev
Log:
Implementation of DDLUTILS-117. Note that DdlUtils now either depends on Java 5 or JAXP 1.3 for compiling or when validation is turned on.

Added:
    db/ddlutils/trunk/src/java/database.xsd
      - copied, changed from r649998, db/ddlutils/trunk/src/schema/database.xsd
    db/ddlutils/trunk/src/java/org/apache/ddlutils/io/ModelValidator.java
Removed:
    db/ddlutils/trunk/src/schema/database.xsd
Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/TestBase.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/TestPlatformBase.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestAlterationAlgorithm.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestModelComparison.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAddColumn.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestChangeColumn.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestConstraints.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDropColumn.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestHsqlDbPlatform.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMcKoiPlatform.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySql50Platform.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySqlPlatform.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestPostgresqlPlatform.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestSqlBuilder.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/task/TestDropTablesCommand.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/task/TestWriteSchemaToFileCommand.java

Copied: db/ddlutils/trunk/src/java/database.xsd (from r649998, db/ddlutils/trunk/src/schema/database.xsd)
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/database.xsd?p2=db/ddlutils/trunk/src/java/database.xsd&p1=db/ddlutils/trunk/src/schema/database.xsd&r1=649998&r2=650023&rev=650023&view=diff
==============================================================================
Binary files - no diff available.

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java Sun Apr 20 23:15:21 2008
@@ -27,12 +27,14 @@
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.Reader;
+import java.io.StringReader;
 import java.io.Writer;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.stream.StreamSource;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.ddlutils.model.CascadeActionEnum;
@@ -59,7 +61,7 @@
     public static final String BASE64_ATTR_NAME = "base64";
 
     /** The namespace used by DdlUtils. */
-    public static final String DDLUTILS_NAMESPACE = "http://db.apache.org/torque/";
+    public static final String DDLUTILS_NAMESPACE = "http://db.apache.org/ddlutils/schema/1.1";
 
     /** Qualified name of the column element. */
     public static final QName QNAME_ELEMENT_COLUMN        = new QName(DDLUTILS_NAMESPACE, "column");
@@ -168,6 +170,10 @@
     {
         try
         {
+            if (_validateXml)
+            {
+                new ModelValidator().validate(new StreamSource(new FileReader(filename)));
+            }
             return read(new FileReader(filename));
         }
         catch (IOException ex)
@@ -186,6 +192,10 @@
     {
         try
         {
+            if (_validateXml)
+            {
+                new ModelValidator().validate(new StreamSource(new FileReader(file)));
+            }
             return read(new FileReader(file));
         }
         catch (IOException ex)
@@ -204,12 +214,36 @@
     {
         try
         {
-            return read(getXMLInputFactory().createXMLStreamReader(reader));
+            if (_validateXml)
+            {
+                StringBuffer tmpXml = new StringBuffer();
+                char[]       buf    = new char[4096];
+                int          len;
+
+                while ((len = reader.read(buf)) >= 0)
+                {
+                    if (tmpXml.length() > 0)
+                    {
+                        tmpXml.append("\n");
+                    }
+                    tmpXml.append(buf, 0, len);
+                }
+                new ModelValidator().validate(new StreamSource(new StringReader(tmpXml.toString())));
+                return read(getXMLInputFactory().createXMLStreamReader(new StringReader(tmpXml.toString())));
+            }
+            else
+            {
+                return read(getXMLInputFactory().createXMLStreamReader(reader));
+            }
         }
         catch (XMLStreamException ex)
         {
             throw new DdlUtilsXMLException(ex);
         }
+        catch (IOException ex)
+        {
+            throw new DdlUtilsXMLException(ex);
+        }
     }
 
     /**
@@ -220,14 +254,7 @@
      */
     public Database read(InputSource source) throws DdlUtilsXMLException
     {
-        try
-        {
-            return read(getXMLInputFactory().createXMLStreamReader(source.getCharacterStream()));
-        }
-        catch (XMLStreamException ex)
-        {
-            throw new DdlUtilsXMLException(ex);
-        }
+        return read(source.getCharacterStream());
     }
 
     /**
@@ -872,6 +899,7 @@
     private void writeDatabaseElement(Database model, PrettyPrintingXmlWriter xmlWriter) throws DdlUtilsXMLException
     {
         writeElementStart(xmlWriter, QNAME_ELEMENT_DATABASE);
+        xmlWriter.writeNamespace(null, DDLUTILS_NAMESPACE);
         writeAttribute(xmlWriter, QNAME_ATTRIBUTE_NAME,              model.getName());
         writeAttribute(xmlWriter, QNAME_ATTRIBUTE_DEFAULT_ID_METHOD, model.getIdMethod());
         writeAttribute(xmlWriter, QNAME_ATTRIBUTE_VERSION,           model.getVersion());
@@ -1034,7 +1062,7 @@
      */
     private void writeElementStart(PrettyPrintingXmlWriter xmlWriter, QName qName) throws DdlUtilsXMLException
     {
-        xmlWriter.writeElementStart(null, qName.getLocalPart());
+        xmlWriter.writeElementStart(qName.getNamespaceURI(), qName.getLocalPart());
     }
 
     /**

Added: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/ModelValidator.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/ModelValidator.java?rev=650023&view=auto
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/ModelValidator.java (added)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/ModelValidator.java Sun Apr 20 23:15:21 2008
@@ -0,0 +1,55 @@
+package org.apache.ddlutils.io;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+/**
+ * Helper class that validates a given document against the DdlUtils schema.
+ * 
+ * @version $Revision: $
+ */
+public class ModelValidator
+{
+    /**
+     * Validates the given xml document using the Java XML validation framework.
+     * 
+     * @param source The source object for the xml document
+     * @throws DdlUtilsXMLException If the document could not be validated
+     */
+    public void validate(Source source) throws DdlUtilsXMLException
+    {
+        try {
+            SchemaFactory factory   = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
+            Schema        schema    = factory.newSchema(new StreamSource(getClass().getResourceAsStream("/database.xsd")));
+            Validator     validator = schema.newValidator();
+
+            validator.validate(source);
+        }
+        catch (Exception ex)
+        {
+            throw new DdlUtilsXMLException(ex);
+        }
+    }
+}

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java Sun Apr 20 23:15:21 2008
@@ -234,6 +234,31 @@
     }
 
     /**
+     * Writes a xmlns attribute to the stream.
+     * 
+     * @param prefix       The prefix for the namespace, use <code>null</code> or an empty string for the default namespace
+     * @param namespaceUri The namespace uri, can be <code>null</code>
+     */
+    public void writeNamespace(String prefix, String namespaceUri) throws DdlUtilsXMLException
+    {
+        try
+        {
+            if ((prefix == null) || (prefix.length() == 0))
+            {
+                _writer.writeDefaultNamespace(namespaceUri);
+            }
+            else
+            {
+                _writer.writeNamespace(prefix, namespaceUri);
+            }
+        }
+        catch (XMLStreamException ex)
+        {
+            throwException(ex);
+        }
+    }
+    
+    /**
      * Writes the start of the indicated XML element.
      * 
      * @param namespaceUri The namespace uri, can be <code>null</code>

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/TestBase.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/TestBase.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/TestBase.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/TestBase.java Sun Apr 20 23:15:21 2008
@@ -59,7 +59,7 @@
         DatabaseIO dbIO = new DatabaseIO();
         
         dbIO.setUseInternalDtd(true);
-        dbIO.setValidateXml(false);
+        dbIO.setValidateXml(true);
         return dbIO.read(new StringReader(dbDef));
     }
 

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/TestPlatformBase.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/TestPlatformBase.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/TestPlatformBase.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/TestPlatformBase.java Sun Apr 20 23:15:21 2008
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.io.StringWriter;
 
+import org.apache.ddlutils.io.DatabaseIO;
 import org.apache.ddlutils.model.Database;
 import org.apache.ddlutils.platform.SqlBuilder;
 
@@ -132,7 +133,7 @@
     {
         final String schema =
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='datatypetest'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='datatypetest'>\n" +
             "  <table name='coltype'>\n" +
             "    <column name='COL_ARRAY'           type='ARRAY'/>\n" +
             "    <column name='COL_BIGINT'          type='BIGINT'/>\n" +
@@ -180,7 +181,7 @@
     {
         final String schema =
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='columnconstraintstest'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='columnconstraintstest'>\n" +
             "  <table name='constraints'>\n" +
             "    <column name='COL_PK' type='VARCHAR' size='32' primaryKey='true'/>\n" +
             "    <column name='COL_PK_AUTO_INCR' type='INTEGER' primaryKey='true' autoIncrement='true'/>\n" +
@@ -203,7 +204,7 @@
     {
         final String schema =
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='tableconstraintstest'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='tableconstraintstest'>\n" +
             "  <table name='table1'>\n" +
             "    <column name='COL_PK_1' type='VARCHAR' size='32' primaryKey='true' required='true'/>\n" +
             "    <column name='COL_PK_2' type='INTEGER' primaryKey='true'/>\n" +
@@ -248,7 +249,7 @@
     {
         final String schema =
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='escapetest'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='escapetest'>\n" +
             "  <table name='escapedcharacters'>\n" +
             "    <column name='COL_PK' type='INTEGER' primaryKey='true'/>\n" +
             "    <column name='COL_TEXT' type='VARCHAR' size='128' default='&#39;'/>\n" +

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestAlterationAlgorithm.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestAlterationAlgorithm.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestAlterationAlgorithm.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestAlterationAlgorithm.java Sun Apr 20 23:15:21 2008
@@ -23,6 +23,7 @@
 
 import org.apache.ddlutils.Platform;
 import org.apache.ddlutils.TestBase;
+import org.apache.ddlutils.io.DatabaseIO;
 import org.apache.ddlutils.model.Database;
 import org.apache.ddlutils.platform.TestPlatform;
 
@@ -76,7 +77,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEA'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -104,14 +105,14 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -136,14 +137,14 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -174,14 +175,14 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -212,14 +213,14 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -250,11 +251,11 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColFK' type='DOUBLE'/>\n" +
@@ -296,7 +297,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -306,7 +307,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEB'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -324,7 +325,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -338,7 +339,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEB'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -356,7 +357,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColFK' type='VARCHAR' size='64'/>\n" +
@@ -370,7 +371,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEB'>\n" +
             "    <column name='COLPK' type='VARCHAR' size='64' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -389,7 +390,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColFK' type='VARCHAR' size='64'/>\n" +
@@ -403,7 +404,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColFK' type='VARCHAR' size='64'/>\n" +
@@ -423,7 +424,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColFK' type='DOUBLE'/>\n" +
@@ -441,7 +442,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "</database>";
 
         assertEqualsIgnoringWhitespaces(
@@ -459,7 +460,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -467,7 +468,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -489,7 +490,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -497,7 +498,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -519,7 +520,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -530,7 +531,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -549,7 +550,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -560,7 +561,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -579,7 +580,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' required='true'/>\n" +
             "    <column name='ColPK2' type='VARCHAR' size='64' required='true'/>\n" +
@@ -587,7 +588,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='VARCHAR' size='64' primaryKey='true' required='true'/>\n" +
@@ -606,7 +607,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' required='true'/>\n" +
             "    <column name='ColPK2' type='VARCHAR' size='64' required='true'/>\n" +
@@ -614,7 +615,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='VARCHAR' size='64' primaryKey='true' required='true'/>\n" +
@@ -635,7 +636,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='VARCHAR' size='64' primaryKey='true' required='true'/>\n" +
@@ -643,7 +644,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' required='true'/>\n" +
             "    <column name='ColPK2' type='VARCHAR' size='64' required='true'/>\n" +
@@ -675,14 +676,14 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -701,7 +702,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64'/>\n" +
@@ -709,7 +710,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -740,14 +741,14 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='VARCHAR' primaryKey='true' size='64'/>\n" +
@@ -781,7 +782,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='VARCHAR' primaryKey='true' size='64'/>\n" +
@@ -789,7 +790,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -821,7 +822,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -835,7 +836,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' primaryKey='true'/>\n" +
@@ -882,7 +883,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' primaryKey='true'/>\n" +
@@ -899,7 +900,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -955,7 +956,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -966,7 +967,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -992,7 +993,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1005,7 +1006,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1044,7 +1045,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1055,7 +1056,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1081,7 +1082,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1094,7 +1095,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1134,7 +1135,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1145,7 +1146,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1168,7 +1169,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -1182,7 +1183,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -1210,7 +1211,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -1224,7 +1225,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='DOUBLE'/>\n" +
@@ -1250,7 +1251,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -1264,7 +1265,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='Col' type='DOUBLE'/>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
@@ -1307,7 +1308,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' required='true'/>\n" +
@@ -1315,7 +1316,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' primaryKey='true' required='true'/>\n" +
@@ -1349,7 +1350,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' primaryKey='true' required='true'/>\n" +
@@ -1357,7 +1358,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' primaryKey='true' required='true'/>\n" +
@@ -1391,7 +1392,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' required='true'/>\n" +
@@ -1407,7 +1408,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' primaryKey='true' required='true'/>\n" +
@@ -1452,7 +1453,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' primaryKey='true' required='true'/>\n" +
@@ -1469,7 +1470,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK1' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColPK2' type='DOUBLE' required='true'/>\n" +
@@ -1513,7 +1514,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1525,7 +1526,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1550,7 +1551,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1563,7 +1564,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col1' type='DOUBLE'/>\n" +
@@ -1587,7 +1588,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='DOUBLE'/>\n" +
@@ -1602,7 +1603,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -1642,7 +1643,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -1650,7 +1651,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='DOUBLE' required='true'/>\n" +
@@ -1684,7 +1685,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -1692,7 +1693,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='DOUBLE' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -1726,7 +1727,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -1737,7 +1738,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='DOUBLE' required='true'/>\n" +
@@ -1775,7 +1776,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -1789,7 +1790,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='DOUBLE' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -1845,7 +1846,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='32' required='true'/>\n" +
@@ -1853,7 +1854,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='64' required='true'/>\n" +
@@ -1887,7 +1888,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='DECIMAL' size='15,2' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -1895,7 +1896,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='DECIMAL' size='30,4' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -1929,7 +1930,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='DECIMAL' size='10,4' required='true'/>\n" +
@@ -1940,7 +1941,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='DECIMAL' size='15,2' required='true'/>\n" +
@@ -1978,7 +1979,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='VARCHAR' size='32' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -1992,7 +1993,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='VARCHAR' size='64' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -2048,7 +2049,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='32' default='test 1' required='true'/>\n" +
@@ -2056,7 +2057,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='VARCHAR' size='32' default='test 2' required='true'/>\n" +
@@ -2090,7 +2091,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='DECIMAL' size='15,2' default='2.0' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -2098,7 +2099,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='DECIMAL' size='15,2' default='4.0' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -2132,7 +2133,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='DATE' default='2000-01-02' required='true'/>\n" +
@@ -2143,7 +2144,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='DATE' default='2001-02-03' required='true'/>\n" +
@@ -2181,7 +2182,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' default='0' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -2195,7 +2196,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' default='1' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -2251,7 +2252,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' autoIncrement='true' required='true'/>\n" +
@@ -2259,7 +2260,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' autoIncrement='false' required='true'/>\n" +
@@ -2293,7 +2294,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' autoIncrement='false' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -2301,7 +2302,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' autoIncrement='true' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -2335,7 +2336,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' autoIncrement='false' required='true'/>\n" +
@@ -2346,7 +2347,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' autoIncrement='true' required='true'/>\n" +
@@ -2385,7 +2386,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' autoIncrement='true' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -2399,7 +2400,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' autoIncrement='false' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -2439,7 +2440,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -2447,7 +2448,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='false'/>\n" +
@@ -2481,7 +2482,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -2489,7 +2490,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='false'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -2523,7 +2524,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='false'/>\n" +
@@ -2534,7 +2535,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='Col' type='INTEGER' required='true'/>\n" +
@@ -2573,7 +2574,7 @@
     {
         final String model1Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='false'/>\n" +
             "  </table>\n" +
@@ -2587,7 +2588,7 @@
             "</database>";
         final String model2Xml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestModelComparison.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestModelComparison.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestModelComparison.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/alteration/TestModelComparison.java Sun Apr 20 23:15:21 2008
@@ -22,6 +22,7 @@
 import java.sql.Types;
 import java.util.List;
 
+import org.apache.ddlutils.io.DatabaseIO;
 import org.apache.ddlutils.model.Database;
 
 /**
@@ -38,14 +39,14 @@
     {
         final String MODEL1 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
             "</database>";
         final String MODEL2 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEA'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -76,14 +77,14 @@
     {
         final String MODEL1 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
             "</database>";
         final String MODEL2 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEA'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -122,7 +123,7 @@
     {
         final String MODEL1 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEA'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='COLFK' type='INTEGER'/>\n" +
@@ -130,7 +131,7 @@
             "</database>";
         final String MODEL2 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEA'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='COLFK' type='INTEGER'/>\n" +
@@ -171,11 +172,11 @@
     {
         final String MODEL1 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "</database>";
         final String MODEL2 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEA'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='COLFK' type='INTEGER'/>\n" +
@@ -236,7 +237,7 @@
     {
         final String MODEL1 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -246,7 +247,7 @@
             "</database>";
         final String MODEL2 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEB'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -272,7 +273,7 @@
     {
         final String MODEL1 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='ColA' type='INTEGER'/>\n" +
@@ -286,7 +287,7 @@
             "</database>";
         final String MODEL2 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEB'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -312,7 +313,7 @@
     {
         final String MODEL1 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='COLFK' type='INTEGER'/>\n" +
@@ -326,7 +327,7 @@
             "</database>";
         final String MODEL2 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEB'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -358,7 +359,7 @@
     {
         final String MODEL1 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
@@ -372,7 +373,7 @@
             "</database>";
         final String MODEL2 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEB'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "    <column name='COLFK' type='INTEGER'/>\n" +
@@ -405,14 +406,14 @@
     {
         final String MODEL1 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableA'>\n" +
             "    <column name='ColPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +
             "</database>";
         final String MODEL2 = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n" +
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TABLEA'>\n" +
             "    <column name='COLPK' type='INTEGER' primaryKey='true' required='true'/>\n" +
             "  </table>\n" +

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/dynabean/TestDynaSqlQueries.java Sun Apr 20 23:15:21 2008
@@ -24,6 +24,7 @@
 
 import org.apache.commons.beanutils.DynaBean;
 import org.apache.ddlutils.TestDatabaseWriterBase;
+import org.apache.ddlutils.io.DatabaseIO;
 import org.apache.ddlutils.model.Table;
 import org.apache.ddlutils.platform.ModelBasedResultSetIterator;
 import org.apache.ddlutils.platform.sybase.SybasePlatform;
@@ -51,7 +52,7 @@
     {
         createDatabase(
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='ddlutils'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
             "  <table name='TestTable'>\n"+
             "    <column name='TheId' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='TheText' type='VARCHAR' size='15'/>\n"+
@@ -110,7 +111,7 @@
     {
         createDatabase(
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='ddlutils'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
             "  <table name='TestTable'>\n"+
             "    <column name='TheId' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='TheText' type='VARCHAR' size='15'/>\n"+
@@ -165,7 +166,7 @@
         if (SybasePlatform.DATABASENAME.equals(getPlatform().getName()))
         {
             modelXml = "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                       "<database name='ddlutils'>\n"+
+                       "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
                        "  <table name='TestTable'>\n"+
                        "    <column name='TheId' type='NUMERIC' size='12,0' primaryKey='true' required='true' autoIncrement='true'/>\n"+
                        "    <column name='TheText' type='VARCHAR' size='15'/>\n"+
@@ -175,7 +176,7 @@
         else
         {
             modelXml = "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                       "<database name='ddlutils'>\n"+
+                       "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
                        "  <table name='TestTable'>\n"+
                        "    <column name='TheId' type='INTEGER' primaryKey='true' required='true' autoIncrement='true'/>\n"+
                        "    <column name='TheText' type='VARCHAR' size='15'/>\n"+
@@ -275,7 +276,7 @@
     {
         createDatabase(
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='ddlutils'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
             "  <table name='TestTable1'>\n"+
             "    <column name='Id1' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='Id2' type='INTEGER'/>\n"+
@@ -320,7 +321,7 @@
     {
         createDatabase(
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='ddlutils'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
             "  <table name='TestTable'>\n"+
             "    <column name='TheId' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='TheText' type='VARCHAR' size='15'/>\n"+
@@ -357,7 +358,7 @@
     {
         createDatabase(
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='ddlutils'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
             "  <table name='TestTable'>\n"+
             "    <column name='TheId' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='TheText' type='VARCHAR' size='15'/>\n"+
@@ -420,7 +421,7 @@
     {
         createDatabase(
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='ddlutils'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
             "  <table name='TestTable'>\n"+
             "    <column name='TheId' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='TheText' type='VARCHAR' size='15'/>\n"+
@@ -463,7 +464,7 @@
     {
         createDatabase(
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='ddlutils'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
             "  <table name='TestTable'>\n"+
             "    <column name='TheId' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='TheText' type='VARCHAR' size='15'/>\n"+
@@ -502,7 +503,7 @@
     {
         createDatabase(
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='ddlutils'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
             "  <table name='TestTable'>\n"+
             "    <column name='TheId' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='TheText' type='VARCHAR' size='15'/>\n"+
@@ -539,7 +540,7 @@
     {
         createDatabase(
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='ddlutils'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='ddlutils'>\n"+
             "  <table name='TestTable'>\n"+
             "    <column name='TheId' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='TheText' type='VARCHAR' size='15'/>\n"+



Mime
View raw message