cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r889886 - in /cxf/branches/2.2.x-fixes: ./ common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Date Sat, 12 Dec 2009 04:16:53 GMT
Author: dkulp
Date: Sat Dec 12 04:16:50 2009
New Revision: 889886

URL: http://svn.apache.org/viewvc?rev=889886&view=rev
Log:
Merged revisions 889885 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r889885 | dkulp | 2009-12-11 23:10:23 -0500 (Fri, 11 Dec 2009) | 1 line
  
  [CXF-2554] Make an attempt at trying to figure this bug out
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 12 04:16:50 2009
@@ -1 +1 @@
-/cxf/trunk:889426,889595,889601,889740,889790-889796
+/cxf/trunk:889426,889595,889601,889740,889790-889796,889885

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=889886&r1=889885&r2=889886&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
(original)
+++ cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Sat Dec 12 04:16:50 2009
@@ -290,12 +290,15 @@
             writer.writeStartElement(prefix, name, namespace);
             if (prefix.length() > 0) {
                 writer.writeNamespace(prefix, namespace);
+                writer.setPrefix(prefix, namespace);
             } else {
                 writer.writeDefaultNamespace(namespace);
+                writer.setDefaultNamespace(namespace);
             }
         } else {
             writer.writeStartElement(name);
             writer.writeDefaultNamespace("");
+            writer.setDefaultNamespace("");
         }
     }
 
@@ -501,8 +504,10 @@
 
             if (nsPrefix.length() == 0) {
                 writer.writeDefaultNamespace(nsURI);
+                writer.setDefaultNamespace(nsURI);
             } else {
                 writer.writeNamespace(nsPrefix, nsURI);
+                writer.setPrefix(nsPrefix, nsURI);
             }
 
             if (nsURI.equals(uri) && nsPrefix.equals(prefix)) {
@@ -516,8 +521,10 @@
         if (writeElementNS) {
             if (prefix == null || prefix.length() == 0) {
                 writer.writeDefaultNamespace(uri);
+                writer.setDefaultNamespace(uri);
             } else {
                 writer.writeNamespace(prefix, uri);
+                writer.setPrefix(prefix, uri);
             }
         }        
         
@@ -544,6 +551,7 @@
                 }
                 if (writeNs) {
                     writer.writeNamespace(nsPrefix, ns);
+                    writer.setPrefix(nsPrefix, ns);
                 }
                 writer.writeAttribute(reader.getAttributePrefix(i), reader.getAttributeNamespace(i),
reader
                     .getAttributeLocalName(i), reader.getAttributeValue(i));
@@ -655,12 +663,14 @@
 //                System.out.println("WriteNamespace is called for prefix : " 
 //                + name + " namespace :" + attr.getNodeValue());
                 writer.writeNamespace(name, attr.getNodeValue());
+                writer.setPrefix(name, attr.getNodeValue());
                 if (name.equals(prefix) && attr.getNodeValue().equals(ns)) {
                     declareNamespace = false;
                 }
             } else {
                 if ("xmlns".equals(name) && "".equals(attrPrefix)) {
-                    writer.writeNamespace("", attr.getNodeValue());
+                    writer.writeDefaultNamespace(attr.getNodeValue());
+                    writer.setDefaultNamespace(attr.getNodeValue());
                     if (attr.getNodeValue().equals(ns)) {
                         declareNamespace = false;
                     } else if (StringUtils.isEmpty(attr.getNodeValue())
@@ -684,8 +694,10 @@
         if (declareNamespace && repairing) {
             if (ns == null) {
                 writer.writeNamespace(prefix, "");
+                writer.setPrefix(prefix, "");
             } else {
                 writer.writeNamespace(prefix, ns);
+                writer.setPrefix(prefix, ns);
             }
         }
 
@@ -1268,9 +1280,12 @@
         case XMLEvent.NAMESPACE:
             if (((Namespace)event).isDefaultNamespaceDeclaration()) {
                 writer.writeDefaultNamespace(((Namespace)event).getNamespaceURI());
+                writer.setDefaultNamespace(((Namespace)event).getNamespaceURI());
             } else {
                 writer.writeNamespace(((Namespace)event).getPrefix(),
                                       ((Namespace)event).getNamespaceURI());
+                writer.setPrefix(((Namespace)event).getPrefix(),
+                                 ((Namespace)event).getNamespaceURI()); 
             }
             break;
         case XMLEvent.COMMENT:



Mime
View raw message