Author: veithen
Date: Fri Apr  1 17:32:25 2011
New Revision: 1087827

URL: http://svn.apache.org/viewvc?rev=1087827&view=rev
Log:
AXIOM-359: Don't trim surrounding whitespace in processing instructions.

Modified:
    
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/resources/conformance/processingInstruction.xml
    
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMProcessingInstructionImpl.java

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/resources/conformance/processingInstruction.xml
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/resources/conformance/processingInstruction.xml?rev=1087827&r1=1087826&r2=1087827&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/resources/conformance/processingInstruction.xml
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/resources/conformance/processingInstruction.xml
 Fri Apr  1 17:32:25 2011
@@ -1,2 +1,8 @@
 <?xml version="1.0"?>
-<root><?pi data?></root>
+<root>
+   <?pi data?>
+   <?pi2
+      Another processing instructions with more surrounding spaces.
+      Regression test for AXIOM-359.
+   ?>
+</root>

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMProcessingInstructionImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMProcessingInstructionImpl.java?rev=1087827&r1=1087826&r2=1087827&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMProcessingInstructionImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMProcessingInstructionImpl.java
 Fri Apr  1 17:32:25 2011
@@ -42,8 +42,8 @@ public class OMProcessingInstructionImpl
     public OMProcessingInstructionImpl(OMContainer parentNode, String target,
                                        String value, OMFactory factory) {
         super(parentNode, factory, true);
-        this.target = (target == null) ? null : target.trim();
-        this.value = (value == null) ? null : value.trim();
+        this.target = target;
+        this.value = value;
         nodeType = OMNode.PI_NODE;
     }
 


Reply via email to