cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r758378 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
Date Wed, 25 Mar 2009 18:08:28 GMT
Author: dkulp
Date: Wed Mar 25 18:08:20 2009
New Revision: 758378

URL: http://svn.apache.org/viewvc?rev=758378&view=rev
Log:
[CXF-2104] Write the correct attribute names out.  I THINK this will fix 2104.

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java?rev=758378&r1=758377&r2=758378&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
Wed Mar 25 18:08:20 2009
@@ -30,6 +30,8 @@
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
 
+import org.apache.cxf.common.util.StringUtils;
+
 /**
  * 
  */
@@ -207,8 +209,14 @@
             if (atts != null) {
                 int attCount = atts.getLength();
                 for (int i = 0; i < attCount; i++) {
-                    writer.writeAttribute(atts.getURI(i), localName,
+                    if (StringUtils.isEmpty(atts.getURI(i))) {
+                        writer.writeAttribute(atts.getLocalName(i),
+                                              atts.getValue(i));
+                    } else {
+                        writer.writeAttribute(atts.getURI(i),
+                                          atts.getQName(i),
                                           atts.getValue(i));
+                    }
                 }
             }
         } catch (XMLStreamException e) {



Mime
View raw message