cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r671214 - /cocoon/whiteboard/corona/trunk/corona-pipeline/src/main/java/org/apache/cocoon/corona/pipeline/util/XMLUtils.java
Date Tue, 24 Jun 2008 15:37:18 GMT
Author: reinhard
Date: Tue Jun 24 08:37:18 2008
New Revision: 671214

URL: http://svn.apache.org/viewvc?rev=671214&view=rev
Log:
set output method because some transformerhandler implementations run into a npe if it is
missing

Modified:
    cocoon/whiteboard/corona/trunk/corona-pipeline/src/main/java/org/apache/cocoon/corona/pipeline/util/XMLUtils.java

Modified: cocoon/whiteboard/corona/trunk/corona-pipeline/src/main/java/org/apache/cocoon/corona/pipeline/util/XMLUtils.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-pipeline/src/main/java/org/apache/cocoon/corona/pipeline/util/XMLUtils.java?rev=671214&r1=671213&r2=671214&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-pipeline/src/main/java/org/apache/cocoon/corona/pipeline/util/XMLUtils.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-pipeline/src/main/java/org/apache/cocoon/corona/pipeline/util/XMLUtils.java
Tue Jun 24 08:37:18 2008
@@ -19,6 +19,7 @@
 import java.io.BufferedInputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.Properties;
 
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.sax.SAXTransformerFactory;
@@ -51,7 +52,9 @@
     public static void toOutputStream(OutputStream outputStream, SaxBuffer saxBuffer) {
         try {
             TransformerHandler transformerHandler = SAX_TRANSFORMER_FACTORY.newTransformerHandler();
-            transformerHandler.getTransformer().setOutputProperties(null);
+            Properties properties = new Properties();
+            properties.put("method", "xml");
+            transformerHandler.getTransformer().setOutputProperties(properties);
             transformerHandler.setResult(new StreamResult(outputStream));
 
             transformerHandler.startDocument();



Mime
View raw message