cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1391510 - /cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
Date Fri, 28 Sep 2012 15:48:53 GMT
Author: dkulp
Date: Fri Sep 28 15:48:52 2012
New Revision: 1391510

URL: http://svn.apache.org/viewvc?rev=1391510&view=rev
Log:
Per javadoc, empty prefix needs to delgate to writeDefaultNamespace

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java?rev=1391510&r1=1391509&r2=1391510&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
(original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
Fri Sep 28 15:48:52 2012
@@ -34,6 +34,7 @@ import javax.xml.stream.XMLStreamConstan
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.staxutils.DelegatingXMLStreamWriter;
 
@@ -86,6 +87,10 @@ public class OutTransformWriter extends 
 
     @Override
     public void writeNamespace(String prefix, String uri) throws XMLStreamException {
+        if (StringUtils.isEmpty(prefix) || "xmlns".equals(prefix)) {
+            writeDefaultNamespace(uri);
+            return;
+        }
         if (matchesDropped(true)) {
             return;
         }



Mime
View raw message