camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1363630 - /camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
Date Fri, 20 Jul 2012 03:17:59 GMT
Author: dkulp
Date: Fri Jul 20 03:17:59 2012
New Revision: 1363630

URL: http://svn.apache.org/viewvc?rev=1363630&view=rev
Log:
If body is an inputstream, leave it that way and use a streamsource that
the xslt engine can handle in a way it's most comfortable with

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java?rev=1363630&r1=1363629&r2=1363630&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java Fri
Jul 20 03:17:59 2012
@@ -417,7 +417,9 @@ public class XsltBuilder implements Proc
             return false;
         }
 
-        if (body instanceof Source) {
+        if (body instanceof InputStream) {
+            return true;
+        } else if (body instanceof Source) {
             return false;
         } else if (body instanceof String) {
             return false;
@@ -450,6 +452,9 @@ public class XsltBuilder implements Proc
             return (Source) body;
         }
         Source source = null;
+        if (body instanceof InputStream) {
+            return new StreamSource((InputStream)body);
+        }
         if (body != null) {
             TypeConverter tc = exchange.getContext().getTypeConverterRegistry().lookup(Source.class,
body.getClass());
             if (tc != null) {



Mime
View raw message