You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2008/08/12 17:00:41 UTC

svn commit: r685174 - /ode/trunk/il-common/src/main/java/org/apache/ode/il/OMUtils.java

Author: mriou
Date: Tue Aug 12 08:00:41 2008
New Revision: 685174

URL: http://svn.apache.org/viewvc?rev=685174&view=rev
Log:
ODE-352 Type attribute replaces xsi-type attribute value

Modified:
    ode/trunk/il-common/src/main/java/org/apache/ode/il/OMUtils.java

Modified: ode/trunk/il-common/src/main/java/org/apache/ode/il/OMUtils.java
URL: http://svn.apache.org/viewvc/ode/trunk/il-common/src/main/java/org/apache/ode/il/OMUtils.java?rev=685174&r1=685173&r2=685174&view=diff
==============================================================================
--- ode/trunk/il-common/src/main/java/org/apache/ode/il/OMUtils.java (original)
+++ ode/trunk/il-common/src/main/java/org/apache/ode/il/OMUtils.java Tue Aug 12 08:00:41 2008
@@ -88,7 +88,7 @@
             else newAttr = doc.createAttributeNS(null,attr.getLocalName());
 
             newAttr.appendChild(doc.createTextNode(attr.getAttributeValue()));
-            domElement.setAttributeNode(newAttr);
+            domElement.setAttributeNodeNS(newAttr);
 
             // Case of qualified attribute values, we're forced to add corresponding namespace declaration manually...
             int colonIdx = attr.getAttributeValue().indexOf(":");
@@ -167,9 +167,10 @@
             OMNamespace attrOmNs = null;
             String attrNs = attr.getNamespaceURI();
             String attrPrefix = attr.getPrefix();
-            if (attrNs != null) attrOmNs = omElement.findNamespace(attrNs,null);
-            if (attrOmNs == null && attrPrefix != null) attrOmNs = omElement.findNamespace(null, attrPrefix);
-            if (attrOmNs == null && attrNs != null) attrOmNs = omf.createOMNamespace(attrNs, null);
+            if (attrNs != null)
+                attrOmNs = omElement.findNamespace(attrNs,null);
+            if (attrOmNs == null && attrPrefix != null)
+                attrOmNs = omElement.findNamespace(null, attrPrefix);
 
             omElement.addAttribute(attr.getLocalName(), attr.getValue(), attrOmNs);
         }