You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2012/07/18 00:44:21 UTC

svn commit: r1362700 - in /webservices/axiom/branches/AXIOM-435: ./ modules/axiom-api/src/main/java/org/apache/axiom/om/ modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/ modules/axiom-api/src/test/java/org/apache/axiom/om/impl/jaxp/ mo...

Author: veithen
Date: Tue Jul 17 22:44:19 2012
New Revision: 1362700

URL: http://svn.apache.org/viewvc?rev=1362700&view=rev
Log:
Merged latest changes from trunk.

Added:
    webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IElement.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/IElement.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/jaxp/
      - copied from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/jaxp/
    webservices/axiom/branches/AXIOM-435/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderFactoryImpl.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderFactoryImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderImpl.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-compat/src/test/java/org/apache/axiom/om/impl/
      - copied from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/test/java/org/apache/axiom/om/impl/
    webservices/axiom/branches/AXIOM-435/modules/axiom-compat/src/test/java/org/apache/axiom/om/impl/dom/
      - copied from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/test/java/org/apache/axiom/om/impl/dom/
    webservices/axiom/branches/AXIOM-435/modules/axiom-compat/src/test/java/org/apache/axiom/om/impl/dom/jaxp/
      - copied from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/test/java/org/apache/axiom/om/impl/dom/jaxp/
    webservices/axiom/branches/AXIOM-435/modules/axiom-compat/src/test/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderFactoryImplTest.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/test/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderFactoryImplTest.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildCyclic.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildCyclic.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildFirst.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildFirst.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildFirstWithDocumentFragment.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildFirstWithDocumentFragment.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildLast.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildLast.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildLastWithDocumentFragment.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildLastWithDocumentFragment.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildMiddle.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildMiddle.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildMiddleWithDocumentFragment.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildMiddleWithDocumentFragment.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildNotFound.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildNotFound.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildNullNewChild.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildNullNewChild.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildSingle.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChildSingle.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestRemoveChildren.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestRemoveChildren.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestRemoveChildren.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestRemoveChildren.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestRemoveChildrenUnexpanded.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestRemoveChildrenUnexpanded.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/element/TestReplaceChildIncomplete.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/element/TestReplaceChildIncomplete.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/conformance/ConformanceTestFile.java
      - copied unchanged from r1362693, webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/conformance/ConformanceTestFile.java
Removed:
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestReplaceChild.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderFactoryImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/jaxp/
    webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/conformance/Conformance.java
Modified:
    webservices/axiom/branches/AXIOM-435/   (props changed)
    webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTestCase.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/serialize/StreamingOMSerializerTest.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuiteBuilder.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/TestGetNamespaceContext.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMElementImplUtil.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-compat/pom.xml
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCloneNode.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestInsertBeforeWithDocumentFragment.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/ConformanceTestCase.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromDOMSource.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromSAXSource.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetSAXSource.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetXMLStreamReader.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement2.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java
    webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml

Propchange: webservices/axiom/branches/AXIOM-435/
------------------------------------------------------------------------------
  Merged /webservices/commons/trunk/modules/axiom:r1361584-1362693

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java Tue Jul 17 22:44:19 2012
@@ -127,6 +127,21 @@ public interface OMContainer extends OMS
     OMNode getFirstOMChild();
 
     /**
+     * Remove all children from this container. This method has the same effect as the following
+     * code:
+     * 
+     * <pre>
+     * for (Iterator it = container.getChildren(); it.hasNext(); ) {
+     *     it.next();
+     *     it.remove();
+     * }</pre>
+     * 
+     * However, the implementation may do this in an optimized way. In particular, if the node is
+     * incomplete, it may choose not to instantiate child node that would become unreachable anyway.
+     */
+    void removeChildren();
+    
+    /**
      * Serialize the node with caching enabled.
      * <p>
      * This method will always serialize the infoset as plain XML. In particular, any {@link OMText}

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java Tue Jul 17 22:44:19 2012
@@ -32,12 +32,7 @@ public interface OMXMLParserWrapper {
     int next() throws OMException;
 
     /**
-     * Discards the current element. This will remove the given element and its descendants.
-     *
-     * @param el
-     * @throws OMException
-     *
-     * @throws OMException
+     * @deprecated Use {@link OMNode#discard()} to discard elements.
      */
     void discard(OMElement el) throws OMException;
 

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java Tue Jul 17 22:44:19 2012
@@ -40,6 +40,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
@@ -272,48 +273,60 @@ public abstract class StAXBuilder implem
         }
     }
 
-    /**
-     * Method discard.
-     *
-     * @param element
-     * @throws OMException
-     */
+    // For compatibility only
     public void discard(OMElement element) throws OMException {
+        discard((OMContainer)element);
+        element.discard();
+    }
+    
+    public void discard(OMContainer container) throws OMException {
 
 //        if (element.isComplete() || !cache) {
 //            throw new OMException();
 //        }
         try {
 
-            // Calculate the depth of the element to be discarded. This determines how many
-            // END_ELEMENT events we need to consume.
-            int targetDepth = elementLevel-1;
-            OMContainerEx current = target;
-            while (current != element) {
-                if (current instanceof OMElement) {
-                    targetDepth--;
-                    current = (OMContainerEx)((OMElement)current).getParent();
-                } else {
-                    throw new OMException("Called discard for an element that is not being built by this builder");
+            if (container instanceof OMDocument) {
+                if (container != document) {
+                    throw new OMException("Called discard for a document that is not being built by this builder");
+                }
+                while (parserNext() != XMLStreamConstants.END_DOCUMENT) {
+                    // Just loop
+                }
+            } else {
+                // Calculate the depth of the element to be discarded. This determines how many
+                // END_ELEMENT events we need to consume.
+                int targetDepth = elementLevel-1;
+                OMContainerEx current = target;
+                while (current != container) {
+                    if (current instanceof OMElement) {
+                        targetDepth--;
+                        current = (OMContainerEx)((OMElement)current).getParent();
+                    } else {
+                        throw new OMException("Called discard for an element that is not being built by this builder");
+                    }
+                }
+                while (elementLevel > targetDepth) {
+                    parserNext();
                 }
-            }
-            
-            while (elementLevel > targetDepth) {
-                parserNext();
             }
 
             // Mark nodes as discarded
-            current = target;
+            OMContainerEx current = target;
             while (true) {
                 current.discarded();
-                if (current == element) {
+                if (current == container) {
                     break;
                 }
                 current = (OMContainerEx)((OMElement)current).getParent();
             }
             
-            target = (OMContainerEx)element.getParent();
-            element.detach();
+            if (container instanceof OMDocument) {
+                target = null;
+                done = true;
+            } else {
+                target = (OMContainerEx)((OMElement)container).getParent();
+            }
         } catch (XMLStreamException e) {
             throw new OMException(e);
         } 

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java Tue Jul 17 22:44:19 2012
@@ -238,6 +238,7 @@ public class StAXOMBuilder extends StAXB
                     case XMLStreamConstants.END_DOCUMENT:
                         done = true;
                         ((OMContainerEx) this.document).setComplete(true);
+                        target = null;
                         break;
                     case XMLStreamConstants.SPACE:
                         try {

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTestCase.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTestCase.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTestCase.java Tue Jul 17 22:44:19 2012
@@ -28,15 +28,15 @@ import junit.framework.TestSuite;
 
 import org.apache.axiom.om.AbstractTestCase;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.testutils.conformance.Conformance;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 
 public class StreamSourceToOMResultTestCase extends AbstractTestCase {
     private final OMMetaFactory omMetaFactory;
     private final TransformerFactory transformerFactory;
-    private final String file;
+    private final ConformanceTestFile file;
     
     private StreamSourceToOMResultTestCase(OMMetaFactory omMetaFactory,
-            TransformerFactory transformerFactory, String name, String file) {
+            TransformerFactory transformerFactory, String name, ConformanceTestFile file) {
         super(name);
         this.omMetaFactory = omMetaFactory;
         this.transformerFactory = transformerFactory;
@@ -44,26 +44,24 @@ public class StreamSourceToOMResultTestC
     }
     
     protected void runTest() throws Throwable {
-        StreamSource source = new StreamSource(getTestResource(file));
+        StreamSource source = new StreamSource(file.getAsStream());
         OMResult result = new OMResult(omMetaFactory.getOMFactory());
         transformerFactory.newTransformer().transform(source, result);
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         result.getDocument().serialize(out);
         assertXMLIdentical(compareXML(
-                toDocumentWithoutDTD(getTestResource(file)),
+                toDocumentWithoutDTD(file.getAsStream()),
                 toDocumentWithoutDTD(new ByteArrayInputStream(out.toByteArray()))), true);
     }
 
     public static TestSuite suite(OMMetaFactory omMetaFactory,
             TransformerFactory transformerFactory) throws Exception {
         TestSuite suite = new TestSuite();
-        String[] files = Conformance.getConformanceTestFiles();
+        ConformanceTestFile[] files = ConformanceTestFile.getConformanceTestFiles();
         for (int i=0; i<files.length; i++) {
-            String file = files[i];
-            int idx = file.lastIndexOf('/');
-            String name = file.substring(idx+1);
+            ConformanceTestFile file = files[i];
             suite.addTest(new StreamSourceToOMResultTestCase(omMetaFactory, transformerFactory,
-                    name, file));
+                    file.getShortName(), file));
         }
         return suite;
     }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/serialize/StreamingOMSerializerTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/serialize/StreamingOMSerializerTest.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/serialize/StreamingOMSerializerTest.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/serialize/StreamingOMSerializerTest.java Tue Jul 17 22:44:19 2012
@@ -30,14 +30,14 @@ import javax.xml.stream.XMLStreamWriter;
 import junit.framework.TestSuite;
 
 import org.apache.axiom.om.AbstractTestCase;
-import org.apache.axiom.testutils.conformance.Conformance;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.util.stax.dialect.StAXDialect;
 import org.apache.axiom.util.stax.dialect.StAXDialectDetector;
 
 public class StreamingOMSerializerTest extends AbstractTestCase {
-    private final String file;
+    private final ConformanceTestFile file;
 
-    public StreamingOMSerializerTest(String name, String file) {
+    public StreamingOMSerializerTest(String name, ConformanceTestFile file) {
         super(name);
         this.file = file;
     }
@@ -51,25 +51,23 @@ public class StreamingOMSerializerTest e
         XMLOutputFactory outputFactory = dialect.normalize(XMLOutputFactory.newInstance());
         StreamingOMSerializer serializer = new StreamingOMSerializer();
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        XMLStreamReader reader = inputFactory.createXMLStreamReader(getTestResource(file));
+        XMLStreamReader reader = inputFactory.createXMLStreamReader(file.getAsStream());
         String encoding = reader.getEncoding();
         XMLStreamWriter writer = outputFactory.createXMLStreamWriter(out, encoding);
         writer.writeStartDocument(encoding, reader.getVersion());
         serializer.serialize(reader, writer, false);
         writer.writeEndDocument();
         writer.flush();
-        assertXMLIdentical(compareXML(toDocumentWithoutDTD(getTestResource(file)),
+        assertXMLIdentical(compareXML(toDocumentWithoutDTD(file.getAsStream()),
                 toDocumentWithoutDTD(new ByteArrayInputStream(out.toByteArray()))), true);
     }
 
     public static TestSuite suite() throws Exception {
         TestSuite suite = new TestSuite();
-        String[] files = Conformance.getConformanceTestFiles();
+        ConformanceTestFile[] files = ConformanceTestFile.getConformanceTestFiles();
         for (int i=0; i<files.length; i++) {
-            String file = files[i];
-            int idx = file.lastIndexOf('/');
-            String name = file.substring(idx+1);
-            suite.addTest(new StreamingOMSerializerTest(name, file));
+            ConformanceTestFile file = files[i];
+            suite.addTest(new StreamingOMSerializerTest(file.getShortName(), file));
         }
         return suite;
     }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuiteBuilder.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuiteBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/DialectTestSuiteBuilder.java Tue Jul 17 22:44:19 2012
@@ -24,7 +24,7 @@ import java.util.List;
 
 import javax.xml.stream.XMLStreamConstants;
 
-import org.apache.axiom.testutils.conformance.Conformance;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.testutils.suite.TestSuiteBuilder;
 
 public class DialectTestSuiteBuilder extends TestSuiteBuilder {
@@ -41,7 +41,7 @@ public class DialectTestSuiteBuilder ext
     }
 
     private void addTests(StAXImplementation staxImpl) {
-        String[] conformanceTestFiles = Conformance.getConformanceTestFiles();
+        ConformanceTestFile[] conformanceTestFiles = ConformanceTestFile.getConformanceTestFiles();
         addTest(new TestCloseInputStream(staxImpl));
         addTest(new TestCloseReader(staxImpl));
         addTest(new TestCreateXMLEventWriterWithNullEncoding(staxImpl));

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/TestGetNamespaceContext.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/TestGetNamespaceContext.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/TestGetNamespaceContext.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/TestGetNamespaceContext.java Tue Jul 17 22:44:19 2012
@@ -27,16 +27,16 @@ import javax.xml.namespace.NamespaceCont
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 
-import org.apache.axiom.om.AbstractTestCase;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.util.namespace.ScopedNamespaceContext;
 
 public class TestGetNamespaceContext extends DialectTestCase {
-    private final String testResource;
+    private final ConformanceTestFile testResource;
     
-    public TestGetNamespaceContext(StAXImplementation staxImpl, String testResource) {
+    public TestGetNamespaceContext(StAXImplementation staxImpl, ConformanceTestFile testResource) {
         super(staxImpl);
         this.testResource = testResource;
-        addTestProperty("file", testResource);
+        addTestProperty("file", testResource.getShortName());
     }
 
     // Copy & paste from XMLStreamReaderComparator
@@ -54,7 +54,7 @@ public class TestGetNamespaceContext ext
     
     protected void runTest() throws Throwable {
         XMLInputFactory factory = staxImpl.newNormalizedXMLInputFactory();
-        InputStream in = AbstractTestCase.getTestResource(testResource);
+        InputStream in = testResource.getAsStream();
         Set/*<String>*/ prefixes = new HashSet();
         Set/*<String>*/ namespaceURIs = new HashSet();
         prefixes.add("");

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java Tue Jul 17 22:44:19 2012
@@ -175,4 +175,31 @@ public final class OMContainerHelper {
         }
         return firstChild;
     }
+    
+    public static void removeChildren(IContainer that) {
+        boolean updateState;
+        if (that.getState() == IParentNode.INCOMPLETE && that.getBuilder() != null) {
+            OMNode lastKnownChild = that.getLastKnownOMChild();
+            if (lastKnownChild != null) {
+                lastKnownChild.build();
+            }
+            ((StAXOMBuilder)that.getBuilder()).discard(that);
+            updateState = true;
+        } else {
+            updateState = false;
+        }
+        IChildNode child = (IChildNode)that.getFirstOMChildIfAvailable();
+        while (child != null) {
+            IChildNode nextSibling = (IChildNode)child.getNextOMSiblingIfAvailable();
+            child.setPreviousOMSibling(null);
+            child.setNextOMSibling(null);
+            child.setParent(null);
+            child = nextSibling;
+        }
+        that.setFirstChild(null);
+        that.setLastChild(null);
+        if (updateState) {
+            that.setComplete(true);
+        }
+    }
 }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMElementImplUtil.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMElementImplUtil.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMElementImplUtil.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMElementImplUtil.java Tue Jul 17 22:44:19 2012
@@ -30,12 +30,14 @@ import javax.xml.namespace.NamespaceCont
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
+import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMSourcedElement;
 import org.apache.axiom.om.OMText;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.util.namespace.MapBasedNamespaceContext;
 import org.apache.axiom.util.stax.XMLStreamReaderUtils;
 
@@ -144,4 +146,11 @@ public class OMElementImplUtil {
             throw new OMException(ex);
         }
     }
+    
+    public static void discard(IElement that) {
+        if (that.getState() == IParentNode.INCOMPLETE && that.getBuilder() != null) {
+            ((StAXOMBuilder)that.getBuilder()).discard((OMContainer)that);
+        }
+        that.detach();
+    }
 }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-compat/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-compat/pom.xml?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-compat/pom.xml (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-compat/pom.xml Tue Jul 17 22:44:19 2012
@@ -51,6 +51,12 @@
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-dom</artifactId>
+            <version>${project.version}</version>
+        	<optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
             <artifactId>axiom-api</artifactId>
             <classifier>tests</classifier>
             <version>${project.version}</version>

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java Tue Jul 17 22:44:19 2012
@@ -20,7 +20,7 @@ package org.apache.axiom.ts.dom;
 
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.apache.axiom.testutils.conformance.Conformance;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.testutils.suite.TestSuiteBuilder;
 
 public class DOMTestSuiteBuilder extends TestSuiteBuilder {
@@ -31,7 +31,7 @@ public class DOMTestSuiteBuilder extends
     }
     
     protected void addTests() {
-        String[] conformanceFiles = Conformance.getConformanceTestFiles();
+        ConformanceTestFile[] conformanceFiles = ConformanceTestFile.getConformanceTestFiles();
         addTest(new org.apache.axiom.ts.dom.attr.TestCloneNode(dbf, true));
         addTest(new org.apache.axiom.ts.dom.attr.TestCloneNode(dbf, false));
         addTest(new org.apache.axiom.ts.dom.attr.TestGetChildNodes(dbf));
@@ -93,7 +93,16 @@ public class DOMTestSuiteBuilder extends
         addTest(new org.apache.axiom.ts.dom.element.TestRemoveFirstChild(dbf));
         addTest(new org.apache.axiom.ts.dom.element.TestRemoveLastChild(dbf));
         addTest(new org.apache.axiom.ts.dom.element.TestRemoveSingleChild(dbf));
-        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChild(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildCyclic(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildFirst(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildFirstWithDocumentFragment(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildLast(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildLastWithDocumentFragment(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildMiddle(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildMiddleWithDocumentFragment(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildNotFound(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildNullNewChild(dbf));
+        addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildSingle(dbf));
         addTest(new org.apache.axiom.ts.dom.element.TestReplaceChildWrongDocument(dbf));
         addTest(new org.apache.axiom.ts.dom.element.TestSetAttributeNodeNSInUse(dbf));
         addTest(new org.apache.axiom.ts.dom.element.TestSetAttributeNodeNSReplace(dbf));

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCloneNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCloneNode.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCloneNode.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCloneNode.java Tue Jul 17 22:44:19 2012
@@ -20,23 +20,23 @@ package org.apache.axiom.ts.dom.document
 
 import javax.xml.parsers.DocumentBuilderFactory;
 
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.ts.dom.DOMTestCase;
 import org.custommonkey.xmlunit.XMLAssert;
 import org.custommonkey.xmlunit.XMLUnit;
 import org.w3c.dom.Document;
 
 public class TestCloneNode extends DOMTestCase {
-    private final String file;
+    private final ConformanceTestFile file;
 
-    public TestCloneNode(DocumentBuilderFactory dbf, String file) {
+    public TestCloneNode(DocumentBuilderFactory dbf, ConformanceTestFile file) {
         super(dbf);
         this.file = file;
-        int idx = file.lastIndexOf('/');
-        addTestProperty("file", file.substring(idx+1));
+        addTestProperty("file", file.getShortName());
     }
 
     protected void runTest() throws Throwable {
-        Document document = dbf.newDocumentBuilder().parse(TestCloneNode.class.getClassLoader().getResourceAsStream(file));
+        Document document = dbf.newDocumentBuilder().parse(file.getAsStream());
         Document document2 = (Document)document.cloneNode(true);
         XMLAssert.assertXMLIdentical(XMLUnit.compareXML(document, document2), true);
     }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestInsertBeforeWithDocumentFragment.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestInsertBeforeWithDocumentFragment.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestInsertBeforeWithDocumentFragment.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestInsertBeforeWithDocumentFragment.java Tue Jul 17 22:44:19 2012
@@ -59,5 +59,7 @@ public class TestInsertBeforeWithDocumen
         assertSame(element, y.getParentNode());
         
         assertNull(fragment.getFirstChild());
+        assertNull(fragment.getLastChild());
+        assertEquals(0, fragment.getChildNodes().getLength());
     }
 }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java Tue Jul 17 22:44:19 2012
@@ -23,6 +23,7 @@ import org.apache.axiom.om.OMCloneOption
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.common.IContainer;
+import org.apache.axiom.om.impl.common.OMContainerHelper;
 import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.Node;
 
@@ -115,4 +116,9 @@ public class DocumentFragmentImpl extend
     public final Node getNextSibling() {
         return null;
     }
+
+    // TODO: we really shouldn't implement IContainer, but only IParentNode
+    public void removeChildren() {
+        OMContainerHelper.removeChildren(this);
+    }
 }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java Tue Jul 17 22:44:19 2012
@@ -625,4 +625,8 @@ public class DocumentImpl extends RootNo
     public final Node getNextSibling() {
         return null;
     }
+    
+    public final void removeChildren() {
+        OMContainerHelper.removeChildren(this);
+    }
 }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java Tue Jul 17 22:44:19 2012
@@ -28,9 +28,7 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.OMElementEx;
-import org.apache.axiom.om.impl.common.IChildNode;
-import org.apache.axiom.om.impl.common.IContainer;
+import org.apache.axiom.om.impl.common.IElement;
 import org.apache.axiom.om.impl.common.IParentNode;
 import org.apache.axiom.om.impl.common.NamespaceIterator;
 import org.apache.axiom.om.impl.common.OMChildElementIterator;
@@ -65,8 +63,8 @@ import java.util.HashMap;
 import java.util.Iterator;
 
 /** Implementation of the org.w3c.dom.Element and org.apache.axiom.om.Element interfaces. */
-public class ElementImpl extends ParentNode implements Element, OMElementEx, IChildNode, NamedNode,
-        OMConstants, IContainer {
+public class ElementImpl extends ParentNode implements Element, IElement, NamedNode,
+        OMConstants {
 
     private static final Log log = LogFactory.getLog(ElementImpl.class);
     
@@ -1217,11 +1215,7 @@ public class ElementImpl extends ParentN
     }
 
     public void discard() throws OMException {
-        if (state == COMPLETE) {
-            this.detach();
-        } else {
-            builder.discard(this);
-        }
+        OMElementImplUtil.discard(this);
     }
 
     /*
@@ -1381,4 +1375,8 @@ public class ElementImpl extends ParentN
     public final IParentNode getIParentNode() {
         return parentNode();
     }
+    
+    public final void removeChildren() {
+        OMContainerHelper.removeChildren(this);
+    }
 }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java Tue Jul 17 22:44:19 2012
@@ -375,7 +375,7 @@ public abstract class ParentNode extends
         NodeImpl oldDomChild = (NodeImpl) oldChild;
 
         if (newChild == null) {
-            return this.removeChild(oldChild);
+            throw new IllegalArgumentException("newChild can't be null");
         }
 
         if (isAncestorOrSelf(newChild)) {
@@ -392,53 +392,61 @@ public abstract class ParentNode extends
         while (!found && children.hasNext()) {
             NodeImpl tempNode = (NodeImpl) children.next();
             if (tempNode.equals(oldChild)) {
+                NodeImpl head; // The first child to insert
+                NodeImpl tail; // The last child to insert
+                
                 if (newChild instanceof DocumentFragmentImpl) {
                     DocumentFragmentImpl docFrag =
                             (DocumentFragmentImpl) newDomChild;
-                    NodeImpl child = (NodeImpl) docFrag.getFirstChild();
-                    this.replaceChild(child, oldChild);
+                    head = (NodeImpl)docFrag.getFirstChild();
+                    tail = (NodeImpl)docFrag.getLastChild();
                     
+                    NodeImpl child = (NodeImpl) docFrag.getFirstChild();
                     //set the parent of all kids to me
                     while(child != null) {
                         child.setParent(this, true);
                         child = child.internalGetNextSibling();
                     }
 
-                    this.lastChild = (NodeImpl)docFrag.getLastChild();
-                    
+                    docFrag.setFirstChild(null);
+                    docFrag.setLastChild(null);
                 } else {
-                    if (this.firstChild == oldDomChild) {
-
-                        if (this.firstChild.internalGetNextSibling() != null) {
-                            this.firstChild.internalGetNextSibling().internalSetPreviousSibling(newDomChild);
-                            newDomChild.internalSetNextSibling(this.firstChild.internalGetNextSibling());
-                        }
-
-                        //Cleanup the current first child
-                        this.firstChild.setParent(null, true);
-                        this.firstChild.internalSetNextSibling(null);
-
-                        //Set the new first child
-                        this.firstChild = newDomChild;
-                        
+                    head = newDomChild;
+                    tail = newDomChild;
+                    newDomChild.setParent(this, true);
+                }
+                
+                if (this.firstChild == oldDomChild) {
 
-                    } else {
-                        newDomChild.internalSetNextSibling(oldDomChild.internalGetNextSibling());
-                        newDomChild.internalSetPreviousSibling(oldDomChild.internalGetPreviousSibling());
+                    if (this.firstChild.internalGetNextSibling() != null) {
+                        this.firstChild.internalGetNextSibling().internalSetPreviousSibling(tail);
+                        tail.internalSetNextSibling(this.firstChild.internalGetNextSibling());
+                    }
 
-                        oldDomChild.internalGetPreviousSibling().internalSetNextSibling(newDomChild);
+                    //Cleanup the current first child
+                    this.firstChild.setParent(null, true);
+                    this.firstChild.internalSetNextSibling(null);
 
-                        // If the old child is not the last
-                        if (oldDomChild.internalGetNextSibling() != null) {
-                            oldDomChild.internalGetNextSibling().internalSetPreviousSibling(newDomChild);
-                        } else {
-                            this.lastChild = newDomChild;
-                        }
+                    //Set the new first child
+                    this.firstChild = head;
+                    
 
+                } else {
+                    // We use getNextSibling here to force bulding the node if necessary
+                    tail.internalSetNextSibling((NodeImpl)oldDomChild.getNextSibling());
+                    head.internalSetPreviousSibling(oldDomChild.internalGetPreviousSibling());
+
+                    oldDomChild.internalGetPreviousSibling().internalSetNextSibling(head);
+
+                    // If the old child is not the last
+                    if (oldDomChild.internalGetNextSibling() != null) {
+                        oldDomChild.internalGetNextSibling().internalSetPreviousSibling(tail);
+                    } else {
+                        this.lastChild = newDomChild;
                     }
 
-                    newDomChild.setParent(this, true);
                 }
+
                 found = true;
 
                 // remove the old child's references to this tree

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java Tue Jul 17 22:44:19 2012
@@ -334,4 +334,8 @@ public class OMDocumentImpl extends OMSe
     public void build() {
         OMContainerHelper.build(this);
     }
+    
+    public void removeChildren() {
+        OMContainerHelper.removeChildren(this);
+    }
 }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java Tue Jul 17 22:44:19 2012
@@ -30,9 +30,9 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.OMXMLStreamReaderConfiguration;
-import org.apache.axiom.om.impl.OMElementEx;
 import org.apache.axiom.om.impl.OMNodeEx;
 import org.apache.axiom.om.impl.common.IContainer;
+import org.apache.axiom.om.impl.common.IElement;
 import org.apache.axiom.om.impl.common.NamespaceIterator;
 import org.apache.axiom.om.impl.common.OMChildElementIterator;
 import org.apache.axiom.om.impl.common.OMChildrenLegacyQNameIterator;
@@ -68,7 +68,7 @@ import java.util.LinkedHashMap;
 
 /** Class OMElementImpl */
 public class OMElementImpl extends OMNodeImpl
-        implements OMElementEx, OMConstants, IContainer {
+        implements IElement, OMConstants {
 
     private static final Log log = LogFactory.getLog(OMElementImpl.class);
     
@@ -915,11 +915,7 @@ public class OMElementImpl extends OMNod
      * @throws OMException
      */
     public void discard() throws OMException {
-        if (state == COMPLETE || builder == null) {
-            this.detach();
-        } else {
-            builder.discard(this);
-        }
+        OMElementImplUtil.discard(this);
     }
 
     public QName resolveQName(String qname) {
@@ -1013,5 +1009,9 @@ public class OMElementImpl extends OMNod
     public SAXSource getSAXSource(boolean cache) {
         return new OMSource(this);
     }
+    
+    public void removeChildren() {
+        OMContainerHelper.removeChildren(this);
+    }
 }
 

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java Tue Jul 17 22:44:19 2012
@@ -1120,4 +1120,14 @@ public class OMSourcedElementImpl extend
             return ((OMDataSourceExt)dataSource).getObject();
         }
     }
+
+    public void removeChildren() {
+        // One might think that if the element is not expanded, we don't need to expand it because
+        // we are going to remove the children anyway. However, this is not true for two reasons:
+        //  * The element may have attributes and they must be available after removeChildren().
+        //  * The local name, namespace URI and/or prefix of the element may be unknown. In that
+        //    case, we need to expand the element to make this information available.
+        forceExpand();
+        super.removeChildren();
+    }
 }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java Tue Jul 17 22:44:19 2012
@@ -28,16 +28,16 @@ import javax.xml.parsers.SAXParserFactor
 import junit.framework.TestSuite;
 
 import org.apache.axiom.om.AbstractTestCase;
-import org.apache.axiom.testutils.conformance.Conformance;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.custommonkey.xmlunit.XMLUnit;
 import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;
 
 public class SAXOMBuilderSAXParserTest extends AbstractTestCase {
     private final SAXParserFactory factory;
-    private final String file;
+    private final ConformanceTestFile file;
     
-    public SAXOMBuilderSAXParserTest(String name, SAXParserFactory factory, String file) {
+    public SAXOMBuilderSAXParserTest(String name, SAXParserFactory factory, ConformanceTestFile file) {
         super(name);
         this.factory = factory;
         this.file = file;
@@ -50,13 +50,13 @@ public class SAXOMBuilderSAXParserTest e
         SAXOMBuilder builder = new SAXOMBuilder();
         reader.setContentHandler(builder);
         reader.setProperty("http://xml.org/sax/properties/lexical-handler", builder);
-        InputStream in = getTestResource(file);
+        InputStream in = file.getAsStream();
         try {
             reader.parse(new InputSource(in));
         } finally {
             in.close();
         }
-        in = getTestResource(file);
+        in = file.getAsStream();
         try {
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             builder.getDocument().serialize(baos);
@@ -70,9 +70,9 @@ public class SAXOMBuilderSAXParserTest e
     }
     
     private static void addTests(TestSuite suite, SAXParserFactory factory, String name) throws Exception {
-        for (String file : Conformance.getConformanceTestFiles()) {
+        for (ConformanceTestFile file : ConformanceTestFile.getConformanceTestFiles()) {
             suite.addTest(new SAXOMBuilderSAXParserTest(
-                    file.substring(file.lastIndexOf('/')+1) + " - " + name, factory, file));
+                    file.getShortName() + " - " + name, factory, file));
         }
     }
     

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/ConformanceTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/ConformanceTestCase.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/ConformanceTestCase.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/ConformanceTestCase.java Tue Jul 17 22:44:19 2012
@@ -20,8 +20,8 @@ package org.apache.axiom.ts;
 
 import java.io.InputStream;
 
-import org.apache.axiom.om.AbstractTestCase;
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 
 /**
  * Base class for test cases that are executed against the files from the conformance test set.
@@ -29,16 +29,15 @@ import org.apache.axiom.om.OMMetaFactory
  * @see org.apache.axiom.om.AbstractTestCase#getConformanceTestFiles()
  */
 public abstract class ConformanceTestCase extends AxiomTestCase {
-    private final String file;
+    private final ConformanceTestFile file;
 
-    public ConformanceTestCase(OMMetaFactory metaFactory, String file) {
+    public ConformanceTestCase(OMMetaFactory metaFactory, ConformanceTestFile file) {
         super(metaFactory);
         this.file = file;
-        int idx = file.lastIndexOf('/');
-        addTestProperty("file", file.substring(idx+1));
+        addTestProperty("file", file.getShortName());
     }
 
     protected InputStream getFileAsStream() {
-        return AbstractTestCase.getTestResource(file);
+        return file.getAsStream();
     }
 }

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java Tue Jul 17 22:44:19 2012
@@ -23,7 +23,7 @@ import java.lang.reflect.Method;
 import javax.xml.namespace.QName;
 
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.testutils.conformance.Conformance;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.testutils.suite.TestSuiteBuilder;
 import org.apache.axiom.ts.om.container.OMContainerFactory;
 import org.apache.axiom.ts.om.container.OMElementFactory;
@@ -59,7 +59,7 @@ public class OMTestSuiteBuilder extends 
     }
     
     protected void addTests() {
-        String[] conformanceFiles = Conformance.getConformanceTestFiles();
+        ConformanceTestFile[] conformanceFiles = ConformanceTestFile.getConformanceTestFiles();
         addTest(new org.apache.axiom.ts.om.attribute.TestDigestWithNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.attribute.TestDigestWithoutNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.attribute.TestEqualsHashCode(metaFactory));
@@ -111,6 +111,10 @@ public class OMTestSuiteBuilder extends 
         addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElementAfterDetach(metaFactory));
         addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElementWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.om.document.TestIsCompleteAfterAddingIncompleteChild(metaFactory));
+        addTest(new org.apache.axiom.ts.om.document.TestRemoveChildren(metaFactory, true, false));
+        addTest(new org.apache.axiom.ts.om.document.TestRemoveChildren(metaFactory, true, true));
+        addTest(new org.apache.axiom.ts.om.document.TestRemoveChildren(metaFactory, false, false));
+        addTest(new org.apache.axiom.ts.om.document.TestRemoveChildren(metaFactory, false, true));
         addTest(new org.apache.axiom.ts.om.document.TestSerializeAndConsume(metaFactory));
         addTest(new org.apache.axiom.ts.om.document.TestSerializeAndConsumeWithIncompleteDescendant(metaFactory));
         addTest(new org.apache.axiom.ts.om.document.TestSetOMDocumentElementNew(metaFactory));
@@ -236,6 +240,8 @@ public class OMTestSuiteBuilder extends 
         addTest(new org.apache.axiom.ts.om.element.TestMultipleDefaultNS(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestRemoveAttribute(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestRemoveAttributeNotOwner(metaFactory));
+        addTest(new org.apache.axiom.ts.om.element.TestRemoveChildren(metaFactory, true));
+        addTest(new org.apache.axiom.ts.om.element.TestRemoveChildren(metaFactory, false));
         addTest(new org.apache.axiom.ts.om.element.TestResolveQNameWithDefaultNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestResolveQNameWithNonDefaultNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestResolveQNameWithoutNamespace(metaFactory));
@@ -386,6 +392,7 @@ public class OMTestSuiteBuilder extends 
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestName4DefaultPrefix(metaFactory));
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestName4QualifiedPrefix(metaFactory));
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestName4Unqualified(metaFactory));
+            addTest(new org.apache.axiom.ts.om.sourcedelement.TestRemoveChildrenUnexpanded(metaFactory));
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeAndConsumeToStream(metaFactory));
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeAndConsumeToWriter(metaFactory));
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeAndConsumeToXMLWriter(metaFactory));

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromDOMSource.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromDOMSource.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromDOMSource.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromDOMSource.java Tue Jul 17 22:44:19 2012
@@ -30,12 +30,13 @@ import org.apache.axiom.om.AbstractTestC
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.ts.ConformanceTestCase;
 import org.custommonkey.xmlunit.XMLAssert;
 import org.custommonkey.xmlunit.XMLUnit;
 
 public class TestCreateOMBuilderFromDOMSource extends ConformanceTestCase {
-    public TestCreateOMBuilderFromDOMSource(OMMetaFactory metaFactory, String file) {
+    public TestCreateOMBuilderFromDOMSource(OMMetaFactory metaFactory, ConformanceTestFile file) {
         super(metaFactory, file);
     }
 

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromSAXSource.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromSAXSource.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromSAXSource.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateOMBuilderFromSAXSource.java Tue Jul 17 22:44:19 2012
@@ -30,13 +30,14 @@ import org.apache.axiom.om.AbstractTestC
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.ts.ConformanceTestCase;
 import org.custommonkey.xmlunit.XMLAssert;
 import org.custommonkey.xmlunit.XMLUnit;
 import org.xml.sax.InputSource;
 
 public class TestCreateOMBuilderFromSAXSource extends ConformanceTestCase {
-    public TestCreateOMBuilderFromSAXSource(OMMetaFactory metaFactory, String file) {
+    public TestCreateOMBuilderFromSAXSource(OMMetaFactory metaFactory, ConformanceTestFile file) {
         super(metaFactory, file);
     }
 

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetSAXSource.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetSAXSource.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetSAXSource.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetSAXSource.java Tue Jul 17 22:44:19 2012
@@ -30,6 +30,7 @@ import org.apache.axiom.om.OMMetaFactory
 import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.util.StAXParserConfiguration;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.ts.ConformanceTestCase;
 import org.apache.xalan.processor.TransformerFactoryImpl;
 import org.custommonkey.xmlunit.XMLAssert;
@@ -39,7 +40,7 @@ public class TestGetSAXSource extends Co
     private final OMContainerFactory containerFactory;
     private final boolean cache;
     
-    public TestGetSAXSource(OMMetaFactory metaFactory, String file, OMContainerFactory containerFactory, boolean cache) {
+    public TestGetSAXSource(OMMetaFactory metaFactory, ConformanceTestFile file, OMContainerFactory containerFactory, boolean cache) {
         super(metaFactory, file);
         this.containerFactory = containerFactory;
         this.cache = cache;

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetXMLStreamReader.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetXMLStreamReader.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetXMLStreamReader.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestGetXMLStreamReader.java Tue Jul 17 22:44:19 2012
@@ -27,6 +27,7 @@ import org.apache.axiom.om.OMMetaFactory
 import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.util.StAXUtils;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.testutils.stax.XMLStreamReaderComparator;
 import org.apache.axiom.ts.ConformanceTestCase;
 
@@ -38,7 +39,7 @@ public class TestGetXMLStreamReader exte
     private final OMContainerFactory containerFactory;
     private final boolean cache;
     
-    public TestGetXMLStreamReader(OMMetaFactory metaFactory, String file, OMContainerFactory containerFactory, boolean cache) {
+    public TestGetXMLStreamReader(OMMetaFactory metaFactory, ConformanceTestFile file, OMContainerFactory containerFactory, boolean cache) {
         super(metaFactory, file);
         this.containerFactory = containerFactory;
         this.cache = cache;

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java Tue Jul 17 22:44:19 2012
@@ -30,6 +30,7 @@ import org.apache.axiom.om.OMMetaFactory
 import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.util.StAXParserConfiguration;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.ts.ConformanceTestCase;
 import org.apache.commons.io.IOUtils;
 import org.custommonkey.xmlunit.XMLAssert;
@@ -40,7 +41,7 @@ public class TestSerialize extends Confo
     private final OMContainerFactory containerFactory;
     private final SerializationMethod serializationMethod;
     
-    public TestSerialize(OMMetaFactory metaFactory, String file,
+    public TestSerialize(OMMetaFactory metaFactory, ConformanceTestFile file,
             OMContainerFactory containerFactory, SerializationMethod serializationMethod) {
         super(metaFactory, file);
         this.containerFactory = containerFactory;

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement2.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement2.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement2.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement2.java Tue Jul 17 22:44:19 2012
@@ -24,12 +24,13 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMXMLBuilderFactory;
+import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.ts.ConformanceTestCase;
 import org.custommonkey.xmlunit.XMLAssert;
 import org.custommonkey.xmlunit.XMLUnit;
 
 public class TestCloneOMElement2 extends ConformanceTestCase {
-    public TestCloneOMElement2(OMMetaFactory metaFactory, String file) {
+    public TestCloneOMElement2(OMMetaFactory metaFactory, ConformanceTestFile file) {
         super(metaFactory, file);
     }
 

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java Tue Jul 17 22:44:19 2012
@@ -49,6 +49,7 @@ public class OMDOMTestSuiteBuilder exten
         addTest(new org.apache.axiom.ts.omdom.element.TestInsertBeforeIncomplete(metaFactory));
         addTest(new org.apache.axiom.ts.omdom.element.TestRemoveAttribute(metaFactory));
         addTest(new org.apache.axiom.ts.omdom.element.TestRemoveChildIncomplete(metaFactory));
+        addTest(new org.apache.axiom.ts.omdom.element.TestReplaceChildIncomplete(metaFactory));
         addTest(new org.apache.axiom.ts.omdom.factory.TestCreateOMAttribute(metaFactory));
         addTest(new org.apache.axiom.ts.omdom.factory.TestCreateOMTextCDATASection(metaFactory));
         addTest(new org.apache.axiom.ts.omdom.factory.TestCreateOMTextCDATASectionWithParent(metaFactory));

Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml?rev=1362700&r1=1362699&r2=1362700&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml Tue Jul 17 22:44:19 2012
@@ -53,6 +53,10 @@
             <version>1.4</version>
         </dependency>
         <dependency>
+            <groupId>${stax.impl.groupid}</groupId>
+            <artifactId>${stax.impl.artifact}</artifactId>
+        </dependency>
+        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
         </dependency>