Author: ruchithf
Date: Wed Jun 28 21:42:17 2006
New Revision: 417940

URL: http://svn.apache.org/viewvc?rev=417940&view=rev
Log:
Hacked adoptNode()  to use importNode()
Fixed removeAttrNS to check for namespaces and remove them accordingly


Modified:
    
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/DocumentImpl.java
    
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java

Modified: 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/DocumentImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/DocumentImpl.java?rev=417940&r1=417939&r2=417940&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/DocumentImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/DocumentImpl.java
 Wed Jun 28 21:42:17 2006
@@ -464,9 +464,9 @@
      * DOM-Level 3 methods
      */
 
-    public Node adoptNode(Node arg0) throws DOMException {
-        // TODO TODO
-        throw new UnsupportedOperationException("TODO");
+    public Node adoptNode(Node node) throws DOMException {
+        //OK... I'm cheating here,  a BIG TODO
+        return this.importNode(node, true);
     }
 
     public String getDocumentURI() {

Modified: 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java?rev=417940&r1=417939&r2=417940&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java
 Wed Jun 28 21:42:17 2006
@@ -262,7 +262,13 @@
                     msg);
         }
 
-        if (this.attributes != null) {
+        if(OMConstants.XMLNS_NS_URI.equals(namespaceURI)) {
+            //look in the ns list
+            if(this.namespaces != null) {
+                this.namespaces.remove(DOMUtil.getLocalName(localName));
+            }
+            
+        } else if (this.attributes != null) {
             this.attributes.removeNamedItemNS(namespaceURI, localName);
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to