cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r890616 - in /cxf/branches/2.1.x-fixes: ./ common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Date Tue, 15 Dec 2009 03:05:00 GMT
Author: dkulp
Date: Tue Dec 15 03:05:00 2009
New Revision: 890616

URL: http://svn.apache.org/viewvc?rev=890616&view=rev
Log:
Merged revisions 889886 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r889886 | dkulp | 2009-12-11 23:16:50 -0500 (Fri, 11 Dec 2009) | 9 lines
  
  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.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Propchange: cxf/branches/2.1.x-fixes/
            ('svn:mergeinfo' removed)

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/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=890616&r1=890615&r2=890616&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
(original)
+++ cxf/branches/2.1.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Tue Dec 15 03:05:00 2009
@@ -281,12 +281,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("");
         }
     }
 
@@ -488,8 +491,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)) {
@@ -503,8 +508,10 @@
         if (writeElementNS) {
             if (prefix == null || prefix.length() == 0) {
                 writer.writeDefaultNamespace(uri);
+                writer.setDefaultNamespace(uri);
             } else {
                 writer.writeNamespace(prefix, uri);
+                writer.setPrefix(prefix, uri);
             }
         }        
         
@@ -531,6 +538,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));
@@ -642,12 +650,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())
@@ -671,8 +681,10 @@
         if (declareNamespace && repairing) {
             if (ns == null) {
                 writer.writeNamespace(prefix, "");
+                writer.setPrefix(prefix, "");
             } else {
                 writer.writeNamespace(prefix, ns);
+                writer.setPrefix(prefix, ns);
             }
         }
 
@@ -1144,9 +1156,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