cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1433033 - in /cxf/trunk/api/src: main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java test/java/org/apache/cxf/staxutils/resources/AddRequestIn3.xml
Date Mon, 14 Jan 2013 18:50:13 GMT
Author: ay
Date: Mon Jan 14 18:50:13 2013
New Revision: 1433033

URL: http://svn.apache.org/viewvc?rev=1433033&view=rev
Log:
[CXF-4753] stax outTransform cannot deep-drop an element hat has some attributs

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
    cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/AddRequestIn3.xml

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=1433033&r1=1433032&r2=1433033&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
Mon Jan 14 18:50:13 2013
@@ -409,6 +409,10 @@ public class OutTransformWriter extends 
     @Override
     public void writeAttribute(String prefix, String uri, String local, String value) 
         throws XMLStreamException {
+        if (matchesDropped(false)) {
+            return;
+        }
+        
         QName expected = attributesMap.get(new QName(uri, local, prefix));
         if (expected != null) {
             if (TransformUtils.isEmptyQName(expected)) {
@@ -426,6 +430,9 @@ public class OutTransformWriter extends 
 
     @Override
     public void writeAttribute(String local, String value) throws XMLStreamException {
+        if (matchesDropped(false)) {
+            return;
+        }
         String uri = XMLConstants.NULL_NS_URI;
         QName expected = attributesMap.get(new QName("", local));
         if (expected != null) {

Modified: cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/AddRequestIn3.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/AddRequestIn3.xml?rev=1433033&r1=1433032&r2=1433033&view=diff
==============================================================================
--- cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/AddRequestIn3.xml (original)
+++ cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/AddRequestIn3.xml Mon Jan
14 18:50:13 2013
@@ -21,6 +21,6 @@
   <params>
     <param><i1>1</i1></param>
     <param><i2>2</i2></param>
-    <param><i3>3</i3></param>
+    <param><i3 a3="v3">3</i3></param>
   </params>
 </payload>



Mime
View raw message