You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/03/25 19:15:08 UTC
svn commit: r758384 - in /cxf/branches/2.1.x-fixes: ./
common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
Author: dkulp
Date: Wed Mar 25 18:14:59 2009
New Revision: 758384
URL: http://svn.apache.org/viewvc?rev=758384&view=rev
Log:
Merged revisions 758378 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r758378 | dkulp | 2009-03-25 14:08:20 -0400 (Wed, 25 Mar 2009) | 2 lines
[CXF-2104] Write the correct attribute names out. I THINK this will fix 2104.
........
Modified:
cxf/branches/2.1.x-fixes/ (props changed)
cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 25 18:14:59 2009
@@ -1 +1 @@
-/cxf/trunk:753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308
+/cxf/trunk:753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java?rev=758384&r1=758383&r2=758384&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java (original)
+++ cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StreamWriterContentHandler.java Wed Mar 25 18:14:59 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) {