You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ru...@apache.org on 2007/01/10 12:31:25 UTC

svn commit: r494789 - /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java

Author: ruchithf
Date: Wed Jan 10 03:31:24 2007
New Revision: 494789

URL: http://svn.apache.org/viewvc?view=rev&rev=494789
Log:
Oops seems like Azeez beat me to it :-) I accidentally reverted WSCOMMONS-147 patch... adding it back

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java?view=diff&rev=494789&r1=494788&r2=494789
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java Wed Jan 10 03:31:24 2007
@@ -148,8 +148,18 @@
     // /org.w3c.dom.Attr methods
     // /
     public String getName() {
-        return (this.namespace == null) ? this.attrName
-                : (OMConstants.XMLNS_NS_PREFIX.equals(this.attrName) ? this.attrName : OMConstants.XMLNS_NS_PREFIX + ":" + this.attrName);
+    	if(this.namespace != null)
+    	{
+    		if((OMConstants.XMLNS_NS_PREFIX.equals(this.attrName))){
+    			return this.attrName;
+    		}else if(OMConstants.XMLNS_NS_URI.equals(this.namespace.getNamespaceURI())){
+    			return OMConstants.XMLNS_NS_PREFIX + ":" + this.attrName;
+    		}else{
+    			return this.namespace.getPrefix()+":"+this.attrName;
+    		}
+    	}else{
+    		return this.attrName;
+    	}
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org