You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/12/27 20:28:41 UTC

svn commit: r1896456 [4/14] - in /xmlbeans/branches/gradle-build: ./ gradle/ gradle/wrapper/ samples/ samples/AbstractTypes/ samples/Any/ samples/DateTime/ samples/MixedContent/ samples/OrderMatters/ samples/SampleTemplate/ samples/SchemaEnum/ samples/...

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument04.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument04.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument04.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument04.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,86 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The "createDocument(namespaceURI,qualifiedName,doctype)" method for a
+ * DOMImplementation should raise WRONG_DOCUMENT_ERR DOMException
+ * if parameter doctype was created from a different implementation.
+ * <p>
+ * Invoke method createDocument(namespaceURI,qualifiedName,doctype) on
+ * a domimplementation that is different from this domimplementation.
+ * Doctype is the type of this document.
+ * Method should raise WRONG_DOCUMENT_ERR DOMException.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='WRONG_DOCUMENT_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='WRONG_DOCUMENT_ERR'])</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocument">http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocument</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('Level-2-Core-DOM-createDocument')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='WRONG_DOCUMENT_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('Level-2-Core-DOM-createDocument')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='WRONG_DOCUMENT_ERR'])</a>
+ */
+public class createDocument04 extends DOMTestCase {
+    @Test
+    @Ignore
+    public void testRun() throws Throwable {
+        String namespaceURI = "http://www.ecommerce.org/schema";
+        String qualifiedName = "namespaceURI:x";
+        Document doc;
+        DocumentType docType;
+        DOMImplementation domImpl;
+        Document aNewDoc;
+        doc = load("staffNS", false);
+        aNewDoc = load("staffNS", false);
+        docType = doc.getDoctype();
+        domImpl = aNewDoc.getImplementation();
+
+        {
+            boolean success = false;
+            try {
+                aNewDoc = domImpl.createDocument(namespaceURI, qualifiedName, docType);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.WRONG_DOCUMENT_ERR);
+            }
+            assertTrue("throw_WRONG_DOCUMENT_ERR", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument04";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument05.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument05.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument05.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument05.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,115 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The "createDocument(namespaceURI,qualifiedName,doctype)" method for a
+ * DOMImplementation should raise INVALID_CHARACTER_ERR DOMException
+ * if parameter qualifiedName contains an illegal character.
+ * <p>
+ * Invoke method createDocument(namespaceURI,qualifiedName,doctype) on
+ * this domimplementation with namespaceURI equals "http://www.ecommerce.org/schema",
+ * doctype is null and qualifiedName contains an illegal character from
+ * illegalChars[].  Method should raise INVALID_CHARACTER_ERR DOMException
+ * for all characters in illegalChars[].
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#">http://www.w3.org/TR/DOM-Level-2-Core/core#</a>
+ */
+public class createDocument05 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        String namespaceURI = "http://www.ecommerce.org/schema";
+        String qualifiedName;
+        Document doc;
+        DocumentType docType = null;
+
+        DOMImplementation domImpl;
+        Document aNewDoc;
+        String charact;
+        java.util.List illegalQNames = new java.util.ArrayList();
+        illegalQNames.add("namespaceURI:{");
+        illegalQNames.add("namespaceURI:}");
+        illegalQNames.add("namespaceURI:~");
+        illegalQNames.add("namespaceURI:'");
+        illegalQNames.add("namespaceURI:!");
+        illegalQNames.add("namespaceURI:@");
+        illegalQNames.add("namespaceURI:#");
+        illegalQNames.add("namespaceURI:$");
+        illegalQNames.add("namespaceURI:%");
+        illegalQNames.add("namespaceURI:^");
+        illegalQNames.add("namespaceURI:&");
+        illegalQNames.add("namespaceURI:*");
+        illegalQNames.add("namespaceURI:(");
+        illegalQNames.add("namespaceURI:)");
+        illegalQNames.add("namespaceURI:+");
+        illegalQNames.add("namespaceURI:=");
+        illegalQNames.add("namespaceURI:[");
+        illegalQNames.add("namespaceURI:]");
+        illegalQNames.add("namespaceURI:\\");
+        illegalQNames.add("namespaceURI:/");
+        illegalQNames.add("namespaceURI:;");
+        illegalQNames.add("namespaceURI:`");
+        illegalQNames.add("namespaceURI:<");
+        illegalQNames.add("namespaceURI:>");
+        illegalQNames.add("namespaceURI:,");
+        illegalQNames.add("namespaceURI:a ");
+        illegalQNames.add("namespaceURI:\"");
+
+        doc = load("staffNS", false);
+        for (int indexd299e125 = 0; indexd299e125 < illegalQNames.size(); indexd299e125++) {
+            qualifiedName = (String) illegalQNames.get(indexd299e125);
+            domImpl = doc.getImplementation();
+
+            {
+                boolean success = false;
+                try {
+                    aNewDoc = domImpl.createDocument(namespaceURI, qualifiedName, docType);
+                } catch (DOMException ex) {
+                    success = (ex.code == DOMException.INVALID_CHARACTER_ERR);
+                }
+                assertTrue("throw_INVALID_CHARACTER_ERR", success);
+            }
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument05";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument06.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument06.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument06.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument06.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,86 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The "createDocument(namespaceURI,qualifiedName,doctype)" method for a
+ * DOMImplementation should raise NAMESPACE_ERR DOMException
+ * if qualifiedName has the "xml" prefix and namespaceURI different from
+ * "http://www.w3.org/XML/1998/namespace"
+ * <p>
+ * Invoke method createDocument(namespaceURI,qualifiedName,doctype) on
+ * this domimplementation with qualifiedName "xml:local"
+ * and namespaceURI as the string
+ * "http://www.ecommerce.org/schema" (which is different from the required
+ * "http://www.w3.org/XML/1998/namespace"). Method should raise
+ * NAMESPACE_ERR DOMException.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocument">http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocument</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('Level-2-Core-DOM-createDocument')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('Level-2-Core-DOM-createDocument')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])</a>
+ */
+public class createDocument06 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        String namespaceURI = "http://ecommerce.org/schema";
+        String qualifiedName = "xml:local";
+        Document doc;
+        DocumentType docType = null;
+
+        DOMImplementation domImpl;
+        Document aNewDoc;
+        doc = load("staffNS", false);
+        domImpl = doc.getImplementation();
+
+        {
+            boolean success = false;
+            try {
+                aNewDoc = domImpl.createDocument(namespaceURI, qualifiedName, docType);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("throw_NAMESPACE_ERR,qualifiedName \"xml:local\", bad NS", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument06";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument07.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument07.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument07.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocument07.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,79 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+
+/**
+ * The "createDocument(namespaceURI,qualifiedName,doctype)" method for a
+ * DOMImplementation should return a new xml Document object of the
+ * specified type with its document element given that all parameters are
+ * valid and correctly formed.
+ * <p>
+ * Invoke method createDocument(namespaceURI,qualifiedName,doctype) on
+ * this domimplementation. namespaceURI is "http://www.ecommerce.org/schema"
+ * qualifiedName is "y:x" and doctype is null.
+ * Method should return a new xml Document as specified by the listed parameters.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocument">http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocument</a>
+ */
+public class createDocument07 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        String namespaceURI = "http://www.ecommerce.org/schema";
+        String qualifiedName = "y:x";
+        Document doc;
+        DocumentType docType = null;
+
+        DOMImplementation domImpl;
+        Document aNewDoc;
+        String nodeName;
+        String nodeValue;
+        doc = load("staffNS", false);
+        domImpl = doc.getImplementation();
+        aNewDoc = domImpl.createDocument(namespaceURI, qualifiedName, docType);
+        nodeName = aNewDoc.getNodeName();
+        nodeValue = aNewDoc.getNodeValue();
+        assertEquals("nodeName", "#document", nodeName);
+        assertNull("nodeValue", nodeValue);
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument07";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType01.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType01.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType01.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType01.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,86 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The "createDocumentType(qualifiedName,publicId,systemId)" method for a
+ * DOMImplementation should raise NAMESPACE_ERR DOMException if
+ * qualifiedName is malformed.
+ * <p>
+ * Retrieve the DOMImplementation on the XMLNS Document.
+ * Invoke method createDocumentType(qualifiedName,publicId,systemId)
+ * on the retrieved DOMImplementation with qualifiedName being the literal
+ * string "prefix::local", publicId as "STAFF", and systemId as "staff".
+ * Method should raise NAMESPACE_ERR DOMException.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocType">http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocType</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('Level-2-Core-DOM-createDocType')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('Level-2-Core-DOM-createDocType')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])</a>
+ */
+
+public class createDocumentType01 extends DOMTestCase {
+    @Test
+    @Ignore
+    public void testRun() throws Throwable {
+        String publicId = "STAFF";
+        String systemId = "staff.xml";
+        String malformedName = "prefix::local";
+        Document doc;
+        DOMImplementation domImpl;
+        DocumentType newType;
+        doc = load("staffNS", false);
+        domImpl = doc.getImplementation();
+
+        {
+            boolean success = false;
+            try {
+                newType = domImpl.createDocumentType(malformedName, publicId, systemId);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("throw_NAMESPACE_ERR", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocumentType01";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType02.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType02.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType02.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType02.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,117 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The "createDocumentType(qualifiedName,publicId,systemId)" method for a
+ * DOMImplementation should raise INVALID_CHARACTER_ERR DOMException if
+ * qualifiedName contains an illegal character.
+ * <p>
+ * Invoke method createDocumentType(qualifiedName,publicId,systemId) on
+ * this domimplementation with qualifiedName containing an illegal character
+ * from illegalChars[]. Method should raise INVALID_CHARACTER_ERR
+ * DOMException for all characters in illegalChars[].
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocType">http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocType</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('Level-2-Core-DOM-createDocType')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('Level-2-Core-DOM-createDocType')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])</a>
+ */
+
+public class createDocumentType02 extends DOMTestCase {
+    @Test
+    @Ignore
+    public void testRun() throws Throwable {
+        String publicId = "http://www.localhost.com/";
+        String systemId = "myDoc.dtd";
+        String qualifiedName;
+        Document doc;
+        DocumentType docType = null;
+
+        DOMImplementation domImpl;
+        java.util.List illegalQNames = new java.util.ArrayList();
+        illegalQNames.add("edi:{");
+        illegalQNames.add("edi:}");
+        illegalQNames.add("edi:~");
+        illegalQNames.add("edi:'");
+        illegalQNames.add("edi:!");
+        illegalQNames.add("edi:@");
+        illegalQNames.add("edi:#");
+        illegalQNames.add("edi:$");
+        illegalQNames.add("edi:%");
+        illegalQNames.add("edi:^");
+        illegalQNames.add("edi:&");
+        illegalQNames.add("edi:*");
+        illegalQNames.add("edi:(");
+        illegalQNames.add("edi:)");
+        illegalQNames.add("edi:+");
+        illegalQNames.add("edi:=");
+        illegalQNames.add("edi:[");
+        illegalQNames.add("edi:]");
+        illegalQNames.add("edi:\\");
+        illegalQNames.add("edi:/");
+        illegalQNames.add("edi:;");
+        illegalQNames.add("edi:`");
+        illegalQNames.add("edi:<");
+        illegalQNames.add("edi:>");
+        illegalQNames.add("edi:,");
+        illegalQNames.add("edi:a ");
+        illegalQNames.add("edi:\"");
+
+        doc = load("staffNS", false);
+        for (int indexd303e125 = 0; indexd303e125 < illegalQNames.size(); indexd303e125++) {
+            qualifiedName = (String) illegalQNames.get(indexd303e125);
+            domImpl = doc.getImplementation();
+
+            {
+                boolean success = false;
+                try {
+                    docType = domImpl.createDocumentType(qualifiedName, publicId, systemId);
+                } catch (DOMException ex) {
+                    success = (ex.code == DOMException.INVALID_CHARACTER_ERR);
+                }
+                assertTrue("throw_INVALID_CHARACTER_ERR", success);
+            }
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocumentType02";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType03.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType03.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType03.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createDocumentType03.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,80 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+
+/**
+ * The "createDocumentType(qualifiedName,publicId,systemId)" method for a
+ * DOMImplementation should return a new DocumentType node
+ * given that qualifiedName is valid and correctly formed.
+ * <p>
+ * Invoke method createDocumentType(qualifiedName,publicId,systemId) on
+ * this domimplementation with qualifiedName "prefix:myDoc".
+ * Method should return a new DocumentType node.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocType">http://www.w3.org/TR/DOM-Level-2-Core/core#Level-2-Core-DOM-createDocType</a>
+ */
+public class createDocumentType03 extends DOMTestCase {
+    @Test
+    @Ignore
+    public void testRun() throws Throwable {
+        String namespaceURI = "http://ecommerce.org/schema";
+        String qualifiedName = "prefix:myDoc";
+        String publicId = "http://www.localhost.com";
+        String systemId = "myDoc.dtd";
+        Document doc;
+        DOMImplementation domImpl;
+        DocumentType newType = null;
+
+        String nodeName;
+        String nodeValue;
+        doc = load("staffNS", false);
+        domImpl = doc.getImplementation();
+        newType = domImpl.createDocumentType(qualifiedName, publicId, systemId);
+        nodeName = newType.getNodeName();
+        assertEquals("nodeName", "prefix:myDoc", nodeName);
+        nodeValue = newType.getNodeValue();
+        assertNull("nodeValue", nodeValue);
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocumentType03";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS01.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS01.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS01.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS01.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,78 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The "createElementNS(namespaceURI,qualifiedName)" method for a
+ * Document should raise NAMESPACE_ERR DOMException if
+ * qualifiedName is malformed.
+ * <p>
+ * Invoke method createElementNS(namespaceURI,qualifiedName) on
+ * the XMLNS Document with namespaceURI being the literal string
+ * "http://www.ecommerce.org/", and qualifiedName as "prefix::local".
+ * Method should raise NAMESPACE_ERR DOMException.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-DocCrElNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-DocCrElNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])</a>
+ */
+public class createElementNS01 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        String namespaceURI = "http://www.ecommerce.org/";
+        String malformedName = "prefix::local";
+        Document doc;
+        Element newElement;
+        doc = load("staffNS", false);
+
+        {
+            boolean success = false;
+            try {
+                newElement = doc.createElementNS(namespaceURI, malformedName);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("throw_NAMESPACE_ERR", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createElementNS01";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS02.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS02.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS02.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS02.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,78 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The "createElementNS(namespaceURI,qualifiedName)" method for a
+ * Document should raise NAMESPACE_ERR DOMException if
+ * qualifiedName has a prefix and namespaceURI is null.
+ * <p>
+ * Invoke method createElementNS(namespaceURI,qualifiedName) on this document
+ * with namespaceURI being null and qualifiedName being "elem:attr1".
+ * Method should raise NAMESPACE_ERR DOMException.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-DocCrElNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-DocCrElNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])</a>
+ */
+public class createElementNS02 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        String namespaceURI = null;
+
+        String qualifiedName = "prefix:local";
+        Document doc;
+        Element newElement;
+        doc = load("staffNS", false);
+
+        {
+            boolean success = false;
+            try {
+                newElement = doc.createElementNS(namespaceURI, qualifiedName);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("throw_NAMESPACE_ERR, qualifiedName has a prefix and namespaceURI is null.", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createElementNS02";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS03.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS03.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS03.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS03.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,111 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The "createElementNS(namespaceURI,qualifiedName)" method for a
+ * Document should raise INVALID_CHARACTER_ERR DOMException if
+ * qualifiedName contains an illegal character.
+ * <p>
+ * Invoke method createElementNS(namespaceURI,qualifiedName) on this document
+ * with qualifiedName containing an illegal character from illegalChars[].
+ * Method should raise INVALID_CHARACTER_ERR DOMException for all characters
+ * in illegalChars[].
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-DocCrElNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-DocCrElNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INVALID_CHARACTER_ERR'])</a>
+ */
+public class createElementNS03 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        String namespaceURI = "http://www.wedding.com/";
+        String qualifiedName;
+        Document doc;
+        boolean done;
+        Element newElement;
+        String charact;
+        java.util.List illegalQNames = new java.util.ArrayList();
+        illegalQNames.add("person:{");
+        illegalQNames.add("person:}");
+        illegalQNames.add("person:~");
+        illegalQNames.add("person:'");
+        illegalQNames.add("person:!");
+        illegalQNames.add("person:@");
+        illegalQNames.add("person:#");
+        illegalQNames.add("person:$");
+        illegalQNames.add("person:%");
+        illegalQNames.add("person:^");
+        illegalQNames.add("person:&");
+        illegalQNames.add("person:*");
+        illegalQNames.add("person:(");
+        illegalQNames.add("person:)");
+        illegalQNames.add("person:+");
+        illegalQNames.add("person:=");
+        illegalQNames.add("person:[");
+        illegalQNames.add("person:]");
+        illegalQNames.add("person:\\");
+        illegalQNames.add("person:/");
+        illegalQNames.add("person:;");
+        illegalQNames.add("person:`");
+        illegalQNames.add("person:<");
+        illegalQNames.add("person:>");
+        illegalQNames.add("person:,");
+        illegalQNames.add("person:a ");
+        illegalQNames.add("person:\"");
+
+        doc = load("staffNS", false);
+        for (int indexd307e125 = 0; indexd307e125 < illegalQNames.size(); indexd307e125++) {
+            qualifiedName = (String) illegalQNames.get(indexd307e125);
+
+            {
+                boolean success = false;
+                try {
+                    newElement = doc.createElementNS(namespaceURI, qualifiedName);
+                } catch (DOMException ex) {
+                    success = (ex.code == DOMException.INVALID_CHARACTER_ERR);
+                }
+                assertTrue("throw_INVALID_CHARACTER_ERR", success);
+            }
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createElementNS03";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS04.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS04.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS04.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS04.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,82 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The "createElementNS(namespaceURI,qualifiedName") method for
+ * a Document should raise NAMESPACE_ERR DOMException if the
+ * qualifiedName has an "xml" prefix and the namespaceURI is different
+ * from http://www.w3.org/XML/1998/namespace".
+ * <p>
+ * Invoke method createElementNS(namespaceURI,qualifiedName) on this document
+ * with qualifiedName being "xml:element1" and namespaceURI equals the string
+ * "http://www.w3.org/XML/1997/namespace" (which differs from the required
+ * string "http://www.w3.org/XML/1998/namespace").
+ * Method should raise NAMESPACE_ERR DOMException.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-258A00AF')/constant[@name='NAMESPACE_ERR'])</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-DocCrElNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])">http://www.w3.org/TR/DOM-Level-2-Core/core#xpointer(id('ID-DocCrElNS')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NAMESPACE_ERR'])</a>
+ */
+public class createElementNS04 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        String namespaceURI = "http://www.w3.org/XML/1998/namespaces";
+        String qualifiedName = "xml:element1";
+        Document doc;
+        Element newElement;
+        doc = load("staffNS", false);
+
+        {
+            boolean success = false;
+            try {
+                newElement = doc.createElementNS(namespaceURI, qualifiedName);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("throw_NAMESPACE_ERR, qualifiedName has an \"xml\" prefix and the namespaceURI is different\n" +
+                       "\n" +
+                       "   from http://www.w3.org/XML/1998/namespace", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createElementNS04";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS05.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS05.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS05.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/createElementNS05.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,68 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertEquals;
+
+
+/**
+ * The "createElementNS(namespaceURI,qualifiedName)" method for a
+ * Document should return a new Element object given that all parameters
+ * are valid and correctly formed.
+ * <p>
+ * Invoke method createElementNS(namespaceURI,qualifiedName on this document
+ * with namespaceURI as "http://www.nist.gov" and qualifiedName as "gov:faculty".
+ * Method should return a new Element object whose name is "gov:faculty".
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-104682815">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-104682815</a>
+ */
+public class createElementNS05 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        String namespaceURI = "http://www.nist.gov";
+        String qualifiedName = "gov:faculty";
+        Document doc;
+        Element newElement;
+        String elementName;
+        doc = load("staffNS", false);
+        newElement = doc.createElementNS(namespaceURI, qualifiedName);
+        elementName = newElement.getTagName();
+        assertEquals("throw_Equals", qualifiedName, elementName);
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/createElementNS05";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS01.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS01.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS01.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS01.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,70 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertEquals;
+
+
+/**
+ * The method createAttributeNS creates an attribute of the given qualified name and namespace URI
+ * Invoke the createAttributeNS method on this Document object with a null
+ * namespaceURI, and a qualifiedName without a prefix.  This should return a valid Attr
+ * node object.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS</a>
+ */
+public class documentcreateattributeNS01 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Attr attribute;
+        String namespaceURI = null;
+
+        String qualifiedName = "test";
+        String name;
+        String nodeName;
+        String nodeValue;
+        doc = load("staffNS", false);
+        attribute = doc.createAttributeNS(namespaceURI, qualifiedName);
+        nodeName = attribute.getNodeName();
+        nodeValue = attribute.getNodeValue();
+        assertEquals("documentcreateattributeNS01", "test", nodeName);
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateattributeNS01";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS02.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS02.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS02.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS02.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,87 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertEquals;
+
+
+/**
+ * The method createAttributeNS creates an attribute of the given qualified name and namespace URI
+ * Invoke the createAttributeNS method on this Document object with a valid values for
+ * namespaceURI, and a qualifiedName as below.  This should return a valid Attr node.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS</a>
+ */
+//BUG:eric's code treats QName as a localname here
+public class documentcreateattributeNS02 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Attr attribute1;
+        Attr attribute2;
+        String name;
+        String nodeName;
+        String nodeValue;
+        String prefix;
+        String namespaceURI;
+        doc = load("staffNS", false);
+        attribute1 = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:xml");
+        name = attribute1.getName();
+        nodeName = attribute1.getNodeName();
+        nodeValue = attribute1.getNodeValue();
+        prefix = attribute1.getPrefix();
+        namespaceURI = attribute1.getNamespaceURI();
+        assertEquals("documentcreateattributeNS02_att1_name", "xml:xml", name);
+        assertEquals("documentcreateattributeNS02_att1_nodeName", "xml:xml", nodeName);
+        assertEquals("documentcreateattributeNS02_att1_nodeValue", "", nodeValue);
+        assertEquals("documentcreateattributeNS02_att1_prefix", "xml", prefix);
+        assertEquals("documentcreateattributeNS02_att1_namespaceURI", "http://www.w3.org/XML/1998/namespace", namespaceURI);
+        attribute2 = doc.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns");
+        name = attribute2.getName();
+        nodeName = attribute2.getNodeName();
+        nodeValue = attribute2.getNodeValue();
+        prefix = attribute2.getPrefix();
+        namespaceURI = attribute2.getNamespaceURI();
+        assertEquals("documentcreateattributeNS02_att2_name", "xmlns", name);
+        assertEquals("documentcreateattributeNS02_att2_nodeName", "xmlns", nodeName);
+        assertEquals("documentcreateattributeNS02_att2_nodeValue", "", nodeValue);
+        assertEquals("documentcreateattributeNS02_att2_namespaceURI", "http://www.w3.org/2000/xmlns/", namespaceURI);
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateattributeNS02";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS03.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS03.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS03.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS03.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,89 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.Attr;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The method createAttributeNS raises an INVALID_CHARACTER_ERR if the specified
+ * qualified name contains an illegal character
+ * <p>
+ * Invoke the createAttributeNS method on this Document object with a valid value for
+ * namespaceURI, and qualifiedNames that contain illegal characters.  Check if the an
+ * INVALID_CHARACTER_ERR was thrown.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS</a>
+ */
+public class documentcreateattributeNS03 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Attr attribute;
+        String namespaceURI = "http://www.w3.org/DOM/Test/Level2";
+        String qualifiedName;
+        java.util.List qualifiedNames = new java.util.ArrayList();
+        qualifiedNames.add("/");
+        qualifiedNames.add("//");
+        qualifiedNames.add("\\");
+        qualifiedNames.add(";");
+        qualifiedNames.add("&");
+        qualifiedNames.add("*");
+        qualifiedNames.add("]]");
+        qualifiedNames.add(">");
+        qualifiedNames.add("<");
+
+        doc = load("staffNS", false);
+        for (int indexd312e67 = 0; indexd312e67 < qualifiedNames.size(); indexd312e67++) {
+            qualifiedName = (String) qualifiedNames.get(indexd312e67);
+
+            {
+                boolean success = false;
+                try {
+                    attribute = doc.createAttributeNS(namespaceURI, qualifiedName);
+                } catch (DOMException ex) {
+                    success = (ex.code == DOMException.INVALID_CHARACTER_ERR);
+                }
+                assertTrue("documentcreateattributeNS03", success);
+            }
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateattributeNS03";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS04.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS04.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS04.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS04.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,85 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.Attr;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The method createAttributeNS raises a NAMESPACE_ERR if the specified qualified name
+ * is malformed.
+ * <p>
+ * Invoke the createAttributeNS method on this Document object with a valid value for
+ * namespaceURI, and malformed qualifiedNames.  Check if the a NAMESPACE_ERR was thrown.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS</a>
+ */
+public class documentcreateattributeNS04 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Attr attribute;
+        String namespaceURI = "http://www.w3.org/DOM/Test/Level2";
+        String qualifiedName;
+        java.util.List qualifiedNames = new java.util.ArrayList();
+        qualifiedNames.add("_:");
+        qualifiedNames.add(":0a");
+        qualifiedNames.add(":");
+        qualifiedNames.add("a:b:c");
+        qualifiedNames.add("_::a");
+
+        doc = load("staffNS", false);
+        for (int indexd313e55 = 0; indexd313e55 < qualifiedNames.size(); indexd313e55++) {
+            qualifiedName = (String) qualifiedNames.get(indexd313e55);
+
+            {
+                boolean success = false;
+                try {
+                    attribute = doc.createAttributeNS(namespaceURI, qualifiedName);
+                } catch (DOMException ex) {
+                    success = (ex.code == DOMException.NAMESPACE_ERR);
+                }
+                assertTrue("documentcreateattributeNS04,valid value for " +
+                           "    namespaceURI, and malformed qualifiedNames", success);
+            }
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateattributeNS04";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS05.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS05.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS05.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS05.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,79 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.*;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The method createAttributeNS raises a NAMESPACE_ERR if the qualifiedName has a prefix and
+ * the namespaceURI is null.
+ * Invoke the createAttributeNS method on a new Document object with a null value for
+ * namespaceURI, and a valid qualifiedName.  Check if a NAMESPACE_ERR is thrown.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS</a>
+ */
+public class documentcreateattributeNS05 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Document newDoc;
+        DocumentType docType = null;
+
+        DOMImplementation domImpl;
+        Attr attribute;
+        String namespaceURI = null;
+
+        String qualifiedName = "abc:def";
+        doc = load("staffNS", false);
+        domImpl = doc.getImplementation();
+        newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test", "dom:doc", docType);
+
+        {
+            boolean success = false;
+            try {
+                attribute = newDoc.createAttributeNS(namespaceURI, qualifiedName);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("documentcreateattributeNS05,null value for \n" +
+                       "    namespaceURI, and a valid qualifiedName", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateattributeNS05";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS06.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS06.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS06.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS06.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,78 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.*;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The method createAttributeNS raises a NAMESPACE_ERR if the qualifiedName has a prefix that
+ * is "xml" and the namespaceURI is different from "http://www.w3.org/XML/1998/namespace".
+ * Invoke the createAttributeNS method on a new DOMImplementation object with  the qualifiedName
+ * as xml:root and namespaceURI as http://www.w3.org/XML/1998 /namespace.
+ * Check if the NAMESPACE_ERR exception is thrown.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS</a>
+ */
+public class documentcreateattributeNS06 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Document newDoc;
+        DocumentType docType = null;
+
+        DOMImplementation domImpl;
+        Attr attribute;
+        String namespaceURI = "http://www.w3.org/XML/1998 /namespace";
+        String qualifiedName = "xml:root";
+        doc = load("staffNS", false);
+        domImpl = doc.getImplementation();
+        newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test", "dom:doc", docType);
+
+        {
+            boolean success = false;
+            try {
+                attribute = newDoc.createAttributeNS(namespaceURI, qualifiedName);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("documentcreateattributeNS06,xml:root and namespaceURI as http://www.w3.org/XML/1998 /namespace.", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateattributeNS06";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS07.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS07.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS07.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateattributeNS07.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,75 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.Attr;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The method createAttributeNS raises a NAMESPACE_ERR if the qualifiedName is xmlns and
+ * the namespaceURI is different from http://www.w3.org/2000/xmlns
+ * <p>
+ * Invoke the createAttributeNS method on this DOMImplementation object with
+ * the qualifiedName as xmlns and namespaceURI as http://www.W3.org/2000/xmlns.
+ * Check if the NAMESPACE_ERR exception is thrown.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrAttrNS</a>
+ */
+public class documentcreateattributeNS07 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Attr attribute;
+        String namespaceURI = "http://www.W3.org/2000/xmlns";
+        String qualifiedName = "xmlns";
+        doc = load("staffNS", false);
+
+        {
+            boolean success = false;
+            try {
+                attribute = doc.createAttributeNS(namespaceURI, qualifiedName);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("documentcreateattributeNS07, qualifiedName as xmlns and namespaceURI as http://www.W3.org/2000/xmlns", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateattributeNS07";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS01.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS01.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS01.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS01.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,78 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertEquals;
+
+
+/**
+ * The method createElementNS creates an element of the given valid qualifiedName and NamespaceURI.
+ * <p>
+ * Invoke the createElementNS method on this Document object with a valid namespaceURI
+ * and qualifiedName.  Check if a valid Element object is returned with the same node attributes.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS</a>
+ */
+public class documentcreateelementNS01 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Element element;
+        String namespaceURI = "http://www.w3.org/DOM/Test/level2";
+        String qualifiedName = "XML:XML";
+        String nodeName;
+        String nsURI;
+        String localName;
+        String prefix;
+        String tagName;
+        doc = load("staffNS", false);
+        element = doc.createElementNS(namespaceURI, qualifiedName);
+        nodeName = element.getNodeName();
+        nsURI = element.getNamespaceURI();
+        localName = element.getLocalName();
+        prefix = element.getPrefix();
+        tagName = element.getTagName();
+        assertEquals("documentcreateelementNS01_nodeName", "XML:XML", nodeName);
+        assertEquals("documentcreateelementNS01_namespaceURI", "http://www.w3.org/DOM/Test/level2", nsURI);
+        assertEquals("documentcreateelementNS01_localName", "XML", localName);
+        assertEquals("documentcreateelementNS01_prefix", "XML", prefix);
+        assertEquals("documentcreateelementNS01_tagName", "XML:XML", tagName);
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateelementNS01";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS02.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS02.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS02.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS02.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,74 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The method createElementNS creates an element of the given valid qualifiedName and NamespaceURI.
+ * <p>
+ * Invoke the createElementNS method on this Document object with null values for namespaceURI,
+ * and a qualifiedName with an invalid character and check if an INVALID_CHARACTER_ERR is thrown.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS</a>
+ */
+public class documentcreateelementNS02 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Element element;
+        String namespaceURI = null;
+
+        String qualifiedName = "^^";
+        doc = load("staffNS", false);
+
+        {
+            boolean success = false;
+            try {
+                element = doc.createElementNS(namespaceURI, qualifiedName);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.INVALID_CHARACTER_ERR);
+            }
+            assertTrue("documentcreateelementNS02", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateelementNS02";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS05.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS05.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS05.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS05.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,77 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The method createElementNS raises a NAMESPACE_ERR if the qualifiedName
+ * has a prefix and
+ * the namespaceURI is null.
+ * <p>
+ * Invoke the createElementNS method on a new Document object with a null value for
+ * namespaceURI, and a valid qualifiedName.  Check if a NAMESPACE_ERR is thrown.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS</a>
+ */
+public class documentcreateelementNS05 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Element element;
+        String namespaceURI = null;
+
+        String qualifiedName = "null:xml";
+        doc = load("staffNS", false);
+
+        {
+            boolean success = false;
+            try {
+                element = doc.createElementNS(namespaceURI, qualifiedName);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("documentcreateelementNS05, null value for" +
+                       "    namespaceURI, and a valid qualifiedName", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateelementNS05";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS06.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS06.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS06.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentcreateelementNS06.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,79 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.*;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * The method createElementNS raises a NAMESPACE_ERR if the qualifiedName
+ * has a prefix that is "xml" and the namespaceURI is different
+ * from http://www.w3.org/XML/1998/namespace
+ * Invoke the createElementNS method on this DOMImplementation object with
+ * the qualifiedName as xml:root and namespaceURI as http://www.w3.org/xml/1998/namespace
+ * Check if the NAMESPACE_ERR exception is thrown.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-DocCrElNS</a>
+ */
+public class documentcreateelementNS06 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Document newDoc;
+        DocumentType docType = null;
+
+        DOMImplementation domImpl;
+        Element element;
+        String namespaceURI = "http://www.w3.org/xml/1998/namespace ";
+        String qualifiedName = "xml:root";
+        doc = load("staffNS", false);
+        domImpl = doc.getImplementation();
+        newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test", "dom:doc", docType);
+
+        {
+            boolean success = false;
+            try {
+                element = newDoc.createElementNS(namespaceURI, qualifiedName);
+            } catch (DOMException ex) {
+                success = (ex.code == DOMException.NAMESPACE_ERR);
+            }
+            assertTrue("documentcreateelementNS06,xml:root and namespaceURI as http://www.w3.org/xml/1998/namespace ", success);
+        }
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentcreateelementNS06";
+    }
+
+}

Added: xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentgetelementbyid01.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentgetelementbyid01.java?rev=1896456&view=auto
==============================================================================
--- xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentgetelementbyid01.java (added)
+++ xmlbeans/branches/gradle-build/src/test/java/org/w3c/domts/level2/core/documentgetelementbyid01.java Mon Dec 27 20:28:38 2021
@@ -0,0 +1,64 @@
+/*
+This Java source file was generated by test-to-java.xsl
+and is a derived work from the source document.
+The source document contained the following notice:
+
+
+
+Copyright (c) 2001 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University).  All
+Rights Reserved.  This program is distributed under the W3C's Software
+Intellectual Property License.  This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+
+
+*/
+
+package org.w3c.domts.level2.core;
+
+
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.domts.DOMTestCase;
+
+import static org.junit.Assert.assertNull;
+
+
+/**
+ * The method getElementById returns the element whose ID is given by elementId.
+ * If not such element exists, returns null.
+ * <p>
+ * Invoke the getElementById method on this Document object with an invalid elementId.
+ * This should return a null element.
+ *
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core">http://www.w3.org/TR/DOM-Level-2-Core/core</a>
+ * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId</a>
+ */
+public class documentgetelementbyid01 extends DOMTestCase {
+    @Test
+    public void testRun() throws Throwable {
+        Document doc;
+        Element element;
+        String elementId = "---";
+        doc = load("staffNS", false);
+        element = doc.getElementById(elementId);
+        assertNull("documentgetelementbyid01", element);
+
+    }
+
+    /**
+     * Gets URI that identifies the test
+     *
+     * @return uri identifier of test
+     */
+    public String getTargetURI() {
+        return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentgetelementbyid01";
+    }
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org