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 [5/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
Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestConstraints.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestConstraints.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestConstraints.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestConstraints.java Sun Apr 20 23:15:21 2008
@@ -87,7 +87,7 @@
         String       tableName = StringUtils.repeat("Test", (getSqlBuilder().getMaxTableNameLength() / 4) + 3);
         final String modelXml  = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='" + tableName + "'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='INTEGER' required='false'/>\n"+
@@ -110,7 +110,7 @@
         String       columnName = StringUtils.repeat("Test", (getSqlBuilder().getMaxColumnNameLength() / 4) + 3);
         final String modelXml   = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='lengthtest'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='" + columnName + "' type='INTEGER' required='false'/>\n"+
@@ -133,7 +133,7 @@
         String       constraintName = StringUtils.repeat("Test", (getSqlBuilder().getMaxConstraintNameLength() / 4) + 3);
         final String modelXml       = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DOUBLE'/>\n"+
@@ -159,7 +159,7 @@
         String       fkName   = StringUtils.repeat("Test", (getSqlBuilder().getMaxForeignKeyNameLength() / 4) + 3);
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip_1'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "  </table>\n"+
@@ -182,7 +182,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='INTEGER' required='false'/>\n"+
@@ -199,7 +199,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='VARCHAR' required='true'/>\n"+
@@ -226,7 +226,7 @@
         if (SybasePlatform.DATABASENAME.equals(getPlatform().getName()))
         {
             modelXml = "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                       "<database name='roundtriptest'>\n"+
+                       "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
                        "  <table name='roundtrip'>\n"+
                        "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
                        "    <column name='avalue' type='NUMERIC' size='12,0' required='true' autoIncrement='true'/>\n"+
@@ -236,7 +236,7 @@
         else
         {
             modelXml = "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                       "<database name='roundtriptest'>\n"+
+                       "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
                        "  <table name='roundtrip'>\n"+
                        "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
                        "    <column name='avalue' type='INTEGER' required='true' autoIncrement='true'/>\n"+
@@ -259,7 +259,7 @@
         if (SybasePlatform.DATABASENAME.equals(getPlatform().getName()))
         {
             modelXml = "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                       "<database name='roundtriptest'>\n"+
+                       "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
                        "  <table name='roundtrip'>\n"+
                        "    <column name='pk' type='NUMERIC' size='12,0' primaryKey='true' required='true' autoIncrement='true'/>\n"+
                        "  </table>\n"+
@@ -268,7 +268,7 @@
         else
         {
             modelXml = "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                       "<database name='roundtriptest'>\n"+
+                       "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
                        "  <table name='roundtrip'>\n"+
                        "    <column name='pk' type='INTEGER' primaryKey='true' required='true' autoIncrement='true'/>\n"+
                        "  </table>\n"+
@@ -291,7 +291,7 @@
 
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DOUBLE'/>\n"+
@@ -316,7 +316,7 @@
 
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='value_1' type='DOUBLE'/>\n"+
@@ -343,7 +343,7 @@
 
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk_1' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='pk_2' type='VARCHAR' size='32' primaryKey='true' required='true'/>\n"+
@@ -365,7 +365,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip_1'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "  </table>\n"+
@@ -388,7 +388,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip_1'>\n"+
             "    <column name='pk_1' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='pk_2' type='VARCHAR' size='32' primaryKey='true' required='true'/>\n"+
@@ -419,7 +419,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip_1'>\n"+
             "    <column name='pk_1' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='pk_2' type='VARCHAR' size='32' primaryKey='true' required='true'/>\n"+
@@ -452,7 +452,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip_1'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "  </table>\n"+
@@ -495,7 +495,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip_1'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "  </table>\n"+
@@ -538,7 +538,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip_1'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "  </table>\n"+
@@ -585,7 +585,7 @@
         {
             final String modelXml = 
                 "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                "<database name='roundtriptest'>\n"+
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
                 "  <table name='roundtrip_1'>\n"+
                 "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
                 "  </table>\n"+
@@ -634,7 +634,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip_1'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "  </table>\n"+
@@ -679,7 +679,7 @@
         {
             final String modelXml = 
                 "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                "<database name='roundtriptest'>\n"+
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
                 "  <table name='roundtrip_1'>\n"+
                 "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
                 "  </table>\n"+
@@ -728,7 +728,7 @@
         {
             final String modelXml = 
                 "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                "<database name='roundtriptest'>\n"+
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
                 "  <table name='roundtrip_1'>\n"+
                 "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
                 "  </table>\n"+
@@ -777,7 +777,7 @@
         {
             final String modelXml =
                 "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-                "<database name='roundtriptest'>\n"+
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
                 "  <table name='roundtrip_1'>\n"+
                 "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
                 "  </table>\n"+

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java Sun Apr 20 23:15:21 2008
@@ -56,7 +56,7 @@
         DatabaseIO dbIO = new DatabaseIO();
 
         dbIO.setUseInternalDtd(true);
-        dbIO.setValidateXml(false);
+        dbIO.setValidateXml(true);
         return dbIO.read(new StringReader(modelAsXml));
     }
 
@@ -240,7 +240,29 @@
      */
     public void testNoDatabaseElement()
     {
-        assertNull(readModel("<data-base></data-base>"));
+        try
+        {
+            readModel("<data-base xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "'></data-base>");
+
+            fail();
+        }
+        catch (DdlUtilsXMLException ex)
+        {}
+    }
+
+    /**
+     * Tests that an exception is generated by the validation when the database element has no namespace attribute.
+     */
+    public void testDatabaseWithoutNamespace()
+    {
+        try
+        {
+            readModel("<database></database>");
+
+            fail();
+        }
+        catch (DdlUtilsXMLException ex)
+        {}
     }
 
     /**
@@ -251,7 +273,7 @@
         try
         {
             readModel(
-                "<database>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "'>\n" +
                 "  <table name='TestTable'>\n" +
                 "    <column name='id'\n" +
                 "            type='INTEGER'\n" +
@@ -262,7 +284,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -272,7 +294,7 @@
     public void testNoTables() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "</database>");
 
         assertEquals("test",
@@ -282,7 +304,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\" />\n",
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\" />\n",
             model);
     }
 
@@ -292,7 +314,7 @@
     public void testTableWithoutColumns() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "  </table>\n" +
@@ -305,7 +327,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\" />\n" +
             "</database>\n",
             model);
@@ -319,7 +341,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table>\n" +
                 "    <column name='id'\n" +
                 "            type='INTEGER'\n" +
@@ -330,7 +352,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -340,7 +362,7 @@
     public void testSingleColumn() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -360,7 +382,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"false\" required=\"false\" type=\"INTEGER\" autoIncrement=\"false\" />\n" +
             "  </table>\n" +
@@ -376,7 +398,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TestTable'>\n" +
                 "    <column type='INTEGER'\n" +
                 "            primaryKey='true'\n" +
@@ -386,7 +408,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -398,7 +420,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TestTable'>\n" +
                 "    <column name='id'\n" +
                 "            primaryKey='true'\n" +
@@ -408,7 +430,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -420,7 +442,7 @@
         StringBuffer modelXml = new StringBuffer();
         int[]        types    = TypeMap.getSuportedJdbcTypes();
 
-        modelXml.append("<database name='test'>\n");
+        modelXml.append("<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n");
         modelXml.append("  <table name='SomeTable'\n");
         modelXml.append("         description='Some table'>\n");
         for (int idx = 0; idx < types.length; idx++)
@@ -452,7 +474,7 @@
 
         modelXml.setLength(0);
         modelXml.append("<?xml version='1.0' encoding='UTF-8'?>\n");
-        modelXml.append("<database name=\"test\">\n");
+        modelXml.append("<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n");
         modelXml.append("  <table name=\"SomeTable\" description=\"Some table\">\n");
         for (int idx = 0; idx < types.length; idx++)
         {
@@ -476,7 +498,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TestTable'>\n" +
                 "    <column name='id'\n" +
                 "            type='illegal'\n" +
@@ -487,7 +509,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -497,7 +519,7 @@
     public void testPrimaryKeyColumn() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -523,7 +545,7 @@
         
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"true\" required=\"false\" type=\"INTEGER\" autoIncrement=\"false\" />\n" +
             "  </table>\n" +
@@ -537,7 +559,7 @@
     public void testRequiredColumn() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -558,7 +580,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"false\" required=\"true\" type=\"INTEGER\" autoIncrement=\"false\" />\n" +
             "  </table>\n" +
@@ -572,7 +594,7 @@
     public void testAutoIncrementColumn() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -598,7 +620,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"false\" required=\"false\" type=\"INTEGER\" autoIncrement=\"true\" />\n" +
             "  </table>\n" +
@@ -612,7 +634,7 @@
     public void testColumnWithSize1() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -633,7 +655,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"false\" required=\"false\" type=\"VARCHAR\" size=\"20\" autoIncrement=\"false\" />\n" +
             "  </table>\n" +
@@ -647,7 +669,7 @@
     public void testColumnWithSize2() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -668,7 +690,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"false\" required=\"false\" type=\"DECIMAL\" size=\"10,3\" autoIncrement=\"false\" />\n" +
             "  </table>\n" +
@@ -682,7 +704,7 @@
     public void testColumnWithDescription() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -703,7 +725,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"false\" required=\"false\" type=\"INTEGER\" autoIncrement=\"false\" description=\"Foo\" />\n" +
             "  </table>\n" +
@@ -717,7 +739,7 @@
     public void testColumnWithDefault() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -739,7 +761,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"false\" required=\"false\" type=\"VARCHAR\" size=\"32\" default=\"Test string\" autoIncrement=\"false\" />\n" +
             "  </table>\n" +
@@ -753,7 +775,7 @@
     public void testColumnWithJavaName() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -774,7 +796,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"false\" required=\"false\" type=\"DOUBLE\" autoIncrement=\"false\" javaName=\"testString\" />\n" +
             "  </table>\n" +
@@ -788,7 +810,7 @@
     public void testSingleForeignkey() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -840,7 +862,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"true\" required=\"true\" type=\"VARCHAR\" size=\"16\" autoIncrement=\"false\" description=\"The primary key\" />\n" +
             "  </table>\n" +
@@ -860,7 +882,7 @@
     public void testForeignkeyWithTwoReferences() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -918,7 +940,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"true\" required=\"true\" type=\"VARCHAR\" size=\"16\" autoIncrement=\"false\" description=\"The primary key\" />\n" +
             "    <column name=\"VALUE1\" primaryKey=\"false\" required=\"false\" type=\"INTEGER\" autoIncrement=\"false\" description=\"A value\" />\n" +
@@ -944,7 +966,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -967,7 +989,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -977,7 +999,7 @@
     public void testNamedForeignkey() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -1023,7 +1045,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"true\" required=\"true\" type=\"VARCHAR\" size=\"16\" autoIncrement=\"false\" description=\"The primary key\" />\n" +
             "  </table>\n" +
@@ -1044,7 +1066,7 @@
     {
         StringBuffer modelXml = new StringBuffer();
 
-        modelXml.append("<database name='test'>\n");
+        modelXml.append("<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n");
         modelXml.append("  <table name='SomeTable'\n");
         modelXml.append("         description='Some table'>\n");
         modelXml.append("    <column name='ID'\n");
@@ -1107,7 +1129,7 @@
 
         modelXml.setLength(0);
         modelXml.append("<?xml version='1.0' encoding='UTF-8'?>\n");
-        modelXml.append("<database name=\"test\">\n");
+        modelXml.append("<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n");
         modelXml.append("  <table name=\"SomeTable\" description=\"Some table\">\n");
         modelXml.append("    <column name=\"ID\" primaryKey=\"true\" required=\"true\" type=\"VARCHAR\" size=\"16\" autoIncrement=\"false\" description=\"The primary key\" />\n");
         modelXml.append("  </table>\n");
@@ -1141,7 +1163,7 @@
     {
         StringBuffer modelXml = new StringBuffer();
 
-        modelXml.append("<database name='test'>\n");
+        modelXml.append("<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n");
         modelXml.append("  <table name='SomeTable'\n");
         modelXml.append("         description='Some table'>\n");
         modelXml.append("    <column name='ID'\n");
@@ -1204,7 +1226,7 @@
 
         modelXml.setLength(0);
         modelXml.append("<?xml version='1.0' encoding='UTF-8'?>\n");
-        modelXml.append("<database name=\"test\">\n");
+        modelXml.append("<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n");
         modelXml.append("  <table name=\"SomeTable\" description=\"Some table\">\n");
         modelXml.append("    <column name=\"ID\" primaryKey=\"true\" required=\"true\" type=\"VARCHAR\" size=\"16\" autoIncrement=\"false\" description=\"The primary key\" />\n");
         modelXml.append("  </table>\n");
@@ -1239,7 +1261,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1275,7 +1297,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1311,7 +1333,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1347,7 +1369,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1383,7 +1405,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1419,7 +1441,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1455,7 +1477,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1491,7 +1513,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1515,7 +1537,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -1527,7 +1549,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1551,7 +1573,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -1561,7 +1583,7 @@
     public void testTwoForeignkeys() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'\n" +
             "         description='Some table'>\n" +
             "    <column name='ID'\n" +
@@ -1625,7 +1647,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\" description=\"Some table\">\n" +
             "    <column name=\"ID\" primaryKey=\"true\" required=\"true\" type=\"VARCHAR\" size=\"16\" autoIncrement=\"false\" description=\"The primary key\" />\n" +
             "    <column name=\"VALUE1\" primaryKey=\"false\" required=\"false\" type=\"INTEGER\" autoIncrement=\"false\" description=\"A value\" />\n" +
@@ -1653,7 +1675,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='SomeTable'\n" +
                 "         description='Some table'>\n" +
                 "    <column name='ID'\n" +
@@ -1700,7 +1722,7 @@
     public void testSingleIndex() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableWithIndex'>\n" +
             "    <column name='id'\n" +
             "            type='DOUBLE'\n" +
@@ -1734,7 +1756,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"TableWithIndex\">\n" +
             "    <column name=\"id\" primaryKey=\"true\" required=\"true\" type=\"DOUBLE\" autoIncrement=\"false\" />\n" +
             "    <column name=\"value\" primaryKey=\"false\" required=\"false\" type=\"SMALLINT\" default=\"1\" autoIncrement=\"false\" />\n" +
@@ -1752,7 +1774,7 @@
     public void testIndexWithTwoColumns() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableWithIndex'>\n" +
             "    <column name='id'\n" +
             "            type='DOUBLE'\n" +
@@ -1793,7 +1815,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"TableWithIndex\">\n" +
             "    <column name=\"id\" primaryKey=\"true\" required=\"true\" type=\"DOUBLE\" autoIncrement=\"false\" />\n" +
             "    <column name=\"when\" primaryKey=\"false\" required=\"true\" type=\"TIMESTAMP\" autoIncrement=\"false\" />\n" +
@@ -1813,7 +1835,7 @@
     public void testIndexWithName() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableWithIndex'>\n" +
             "    <column name='id'\n" +
             "            type='DOUBLE'\n" +
@@ -1847,7 +1869,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"TableWithIndex\">\n" +
             "    <column name=\"id\" primaryKey=\"true\" required=\"true\" type=\"DOUBLE\" autoIncrement=\"false\" />\n" +
             "    <column name=\"value\" primaryKey=\"false\" required=\"false\" type=\"SMALLINT\" default=\"1\" autoIncrement=\"false\" />\n" +
@@ -1867,7 +1889,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWithIndex'>\n" +
                 "    <column name='id'\n" +
                 "            type='DOUBLE'\n" +
@@ -1883,7 +1905,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -1895,7 +1917,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWithIndex'>\n" +
                 "    <column name='id'\n" +
                 "            type='DOUBLE'\n" +
@@ -1924,7 +1946,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWithIndex'>\n" +
                 "    <column name='id'\n" +
                 "            type='DOUBLE'\n" +
@@ -1941,7 +1963,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -1952,7 +1974,7 @@
     public void testSingleUniqueIndex() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableWithIndex'>\n" +
             "    <column name='id'\n" +
             "            type='DOUBLE'\n" +
@@ -1986,7 +2008,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"TableWithIndex\">\n" +
             "    <column name=\"id\" primaryKey=\"true\" required=\"true\" type=\"DOUBLE\" autoIncrement=\"false\" />\n" +
             "    <column name=\"value\" primaryKey=\"false\" required=\"false\" type=\"SMALLINT\" default=\"1\" autoIncrement=\"false\" />\n" +
@@ -2004,7 +2026,7 @@
     public void testUniqueIndexWithTwoColumns() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableWithIndex'>\n" +
             "    <column name='id'\n" +
             "            type='DOUBLE'\n" +
@@ -2045,7 +2067,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"TableWithIndex\">\n" +
             "    <column name=\"id\" primaryKey=\"true\" required=\"true\" type=\"DOUBLE\" autoIncrement=\"false\" />\n" +
             "    <column name=\"when\" primaryKey=\"false\" required=\"true\" type=\"TIMESTAMP\" autoIncrement=\"false\" />\n" +
@@ -2065,7 +2087,7 @@
     public void testUniqueIndexWithName() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableWithIndex'>\n" +
             "    <column name='id'\n" +
             "            type='DOUBLE'\n" +
@@ -2099,7 +2121,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"TableWithIndex\">\n" +
             "    <column name=\"id\" primaryKey=\"true\" required=\"true\" type=\"DOUBLE\" autoIncrement=\"false\" />\n" +
             "    <column name=\"value\" primaryKey=\"false\" required=\"false\" type=\"SMALLINT\" default=\"1\" autoIncrement=\"false\" />\n" +
@@ -2119,7 +2141,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWithIndex'>\n" +
                 "    <column name='id'\n" +
                 "            type='DOUBLE'\n" +
@@ -2135,7 +2157,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -2147,7 +2169,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWithIndex'>\n" +
                 "    <column name='id'\n" +
                 "            type='DOUBLE'\n" +
@@ -2176,7 +2198,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWithIndex'>\n" +
                 "    <column name='id'\n" +
                 "            type='DOUBLE'\n" +
@@ -2193,7 +2215,7 @@
 
             fail();
         }
-        catch (ModelException ex)
+        catch (DdlUtilsXMLException ex)
         {}
     }
 
@@ -2203,7 +2225,7 @@
     public void testMixedIndexes() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='TableWithIndexes'>\n" +
             "    <column name='id'\n" +
             "            type='SMALLINT'\n" +
@@ -2246,7 +2268,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"TableWithIndexes\">\n" +
             "    <column name=\"id\" primaryKey=\"false\" required=\"true\" type=\"SMALLINT\" autoIncrement=\"true\" />\n" +
             "    <column name=\"when\" primaryKey=\"false\" required=\"false\" type=\"DATE\" autoIncrement=\"false\" />\n" +
@@ -2271,7 +2293,7 @@
         // C = id:CHAR(32), text:LONGVARCHAR; index 'byText' (text)
         
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='A'\n" +
             "         description='Table A'>\n" +
             "    <column name='id'\n" +
@@ -2411,7 +2433,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"A\" description=\"Table A\">\n" +
             "    <column name=\"id\" primaryKey=\"true\" required=\"true\" type=\"INTEGER\" autoIncrement=\"true\" description=\"The primary key of table A\" />\n" +
             "    <column name=\"parentId\" primaryKey=\"false\" required=\"false\" type=\"INTEGER\" autoIncrement=\"false\" description=\"The field for the foreign key parent\" />\n" +
@@ -2457,7 +2479,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWidthIndex'>\n" +
                 "    <column name='id'\n" +
                 "            type='INTEGER'\n" +
@@ -2484,7 +2506,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TestTable'>\n" +
                 "    <column name='id1'\n" +
                 "            type='INTEGER'\n" +
@@ -2514,7 +2536,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TestTable'>\n" +
                 "    <column name='id'\n" +
                 "            type='INTEGER'\n" +
@@ -2539,7 +2561,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWidthUnique'>\n" +
                 "    <column name='id'\n" +
                 "            type='INTEGER'\n" +
@@ -2565,7 +2587,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWidthIndex'>\n" +
                 "    <column name='id'\n" +
                 "            type='INTEGER'\n" +
@@ -2601,7 +2623,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWidthUnique'>\n" +
                 "    <column name='id'\n" +
                 "            type='INTEGER'\n" +
@@ -2637,7 +2659,7 @@
         try
         {
             readModel(
-                "<database name='test'>\n" +
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
                 "  <table name='TableWidthUnique'>\n" +
                 "    <column name='id'\n" +
                 "            type='INTEGER'\n" +
@@ -2669,12 +2691,17 @@
      */
     public void testFaultReadOfTable() 
     {
-        Database database = readModel(
-                "<database name='db' >\n" +
+        try
+        {
+            readModel(
+                "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='db' >\n" +
                 "  <index name='NotATable'/>\n" +
                 "</database>");
 
-        assertEquals(0, database.getTableCount());
+            fail();
+        }
+        catch (DdlUtilsXMLException ex)
+        {}
     }
 
     /**
@@ -2683,7 +2710,7 @@
     public void testTurbineExtension() throws Exception
     {
         Database model = readModel(
-            "<database name='test'>\n" +
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" +
             "  <table name='SomeTable'>\n" +
             "    <column name='intField'\n" +
             "            type='BOOLEANINT'/>\n" +
@@ -2706,7 +2733,7 @@
 
         assertEquals(
             "<?xml version='1.0' encoding='UTF-8'?>\n" +
-            "<database name=\"test\">\n" +
+            "<database xmlns=\"" + DatabaseIO.DDLUTILS_NAMESPACE + "\" name=\"test\">\n" +
             "  <table name=\"SomeTable\">\n" +
             "    <column name=\"intField\" primaryKey=\"false\" required=\"false\" type=\"TINYINT\" autoIncrement=\"false\" />\n" +
             "    <column name=\"charField\" primaryKey=\"false\" required=\"false\" type=\"CHAR\" autoIncrement=\"false\" />\n" +

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java?rev=650023&r1=650022&r2=650023&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java Sun Apr 20 23:15:21 2008
@@ -147,7 +147,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='BIT'/>\n"+
@@ -164,7 +164,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='BIT' required='true' default='FALSE'/>\n"+
@@ -181,7 +181,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='BOOLEAN'/>\n"+
@@ -198,7 +198,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='BOOLEAN' required='true' default='true'/>\n"+
@@ -215,7 +215,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='TINYINT'/>\n"+
@@ -232,7 +232,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='TINYINT' required='true' default='-200'/>\n"+
@@ -249,7 +249,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='SMALLINT'/>\n"+
@@ -266,7 +266,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='SMALLINT' required='true' default='-30000'/>\n"+
@@ -283,7 +283,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='INTEGER'/>\n"+
@@ -300,7 +300,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='INTEGER' required='true' default='2147483647'/>\n"+
@@ -317,7 +317,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='BIGINT'/>\n"+
@@ -334,7 +334,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='BIGINT' required='true' default='-9000000000000000000'/>\n"+
@@ -351,7 +351,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='REAL'/>\n"+
@@ -368,7 +368,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='REAL' required='true' default='-1.01234'/>\n"+
@@ -385,7 +385,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='FLOAT'/>\n"+
@@ -402,7 +402,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='FLOAT' required='true' default='12345678.9012345'/>\n"+
@@ -419,7 +419,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DOUBLE'/>\n"+
@@ -436,7 +436,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DOUBLE' required='true' default='-987654321.098765'/>\n"+
@@ -453,7 +453,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DECIMAL' size='13'/>\n"+
@@ -470,7 +470,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DECIMAL' size='15' required='true' default='123456789012345'/>\n"+
@@ -487,7 +487,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DECIMAL' size='15,7'/>\n"+
@@ -504,7 +504,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DECIMAL' size='15,7' required='true' default='12345678.7654321'/>\n"+
@@ -521,7 +521,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='NUMERIC' size='12'/>\n"+
@@ -538,7 +538,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='NUMERIC' size='15' required='true' default='-123456789012345'/>\n"+
@@ -555,7 +555,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='NUMERIC' size='15,8'/>\n"+
@@ -572,7 +572,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='NUMERIC' size='15,8' required='true' default='-1234567.87654321'/>\n"+
@@ -589,7 +589,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='CHAR' size='10'/>\n"+
@@ -606,7 +606,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='CHAR' size='15' required='true' default='543210987654321'/>\n"+
@@ -623,7 +623,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='VARCHAR' size='20'/>\n"+
@@ -640,7 +640,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='VARCHAR' size='254' required='true' default='some value'/>\n"+
@@ -662,7 +662,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='VARCHAR' size='12' required='true' default='someone&apos;s'/>\n"+
@@ -679,7 +679,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='VARCHAR' size='12' required='true' default='&apos;'/>\n"+
@@ -696,7 +696,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='LONGVARCHAR'/>\n"+
@@ -720,7 +720,7 @@
 
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='LONGVARCHAR' required='true' default='some value'/>\n"+
@@ -742,7 +742,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DATE'/>\n"+
@@ -760,7 +760,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='DATE' required='true' default='2000-01-01'/>\n"+
@@ -778,7 +778,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='TIME'/>\n"+
@@ -796,7 +796,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='TIME' required='true' default='11:27:03'/>\n"+
@@ -814,7 +814,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='TIMESTAMP'/>\n"+
@@ -834,7 +834,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='TIMESTAMP' required='true' default='1985-06-17 16:17:18'/>\n"+
@@ -854,7 +854,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='BINARY'/>\n"+
@@ -881,7 +881,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='VARBINARY'/>\n"+
@@ -907,7 +907,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='LONGVARBINARY'/>\n"+
@@ -933,7 +933,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='BLOB'/>\n"+
@@ -959,7 +959,7 @@
     {
         final String modelXml = 
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
-            "<database name='roundtriptest'>\n"+
+            "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
             "  <table name='roundtrip'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
             "    <column name='avalue' type='CLOB'/>\n"+



Mime
View raw message