jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r533508 - in /jackrabbit/trunk: contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/ jackrabbit-jcr-te...
Date Sun, 29 Apr 2007 14:14:54 GMT
Author: reschke
Date: Sun Apr 29 07:14:54 2007
New Revision: 533508

URL: http://svn.apache.org/viewvc?view=rev&rev=533508
Log:
JCR-892: fix setting of Transformer output properties.

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/AbstractImportXmlTest.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java?view=diff&rev=533508&r1=533507&r2=533508
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
Sun Apr 29 07:14:54 2007
@@ -448,10 +448,10 @@
         SAXTransformerFactory stf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
         try {
             TransformerHandler th = stf.newTransformerHandler();
+            th.getTransformer().setOutputProperty(OutputKeys.METHOD, "xml");
+            th.getTransformer().setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            th.getTransformer().setOutputProperty(OutputKeys.INDENT, "no");
             th.setResult(new StreamResult(out));
-            th.getTransformer().setParameter(OutputKeys.METHOD, "xml");
-            th.getTransformer().setParameter(OutputKeys.ENCODING, "UTF-8");
-            th.getTransformer().setParameter(OutputKeys.INDENT, "no");
 
             exportSystemView(absPath, th, skipBinary, noRecurse);
         } catch (TransformerException te) {
@@ -481,10 +481,10 @@
         SAXTransformerFactory stf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
         try {
             TransformerHandler th = stf.newTransformerHandler();
+            th.getTransformer().setOutputProperty(OutputKeys.METHOD, "xml");
+            th.getTransformer().setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            th.getTransformer().setOutputProperty(OutputKeys.INDENT, "no");
             th.setResult(new StreamResult(out));
-            th.getTransformer().setParameter(OutputKeys.METHOD, "xml");
-            th.getTransformer().setParameter(OutputKeys.ENCODING, "UTF-8");
-            th.getTransformer().setParameter(OutputKeys.INDENT, "no");
 
             exportDocumentView(absPath, th, skipBinary, noRecurse);
         } catch (TransformerException te) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java?view=diff&rev=533508&r1=533507&r2=533508
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
Sun Apr 29 07:14:54 2007
@@ -1158,10 +1158,10 @@
 
         try {
             TransformerHandler th = stf.newTransformerHandler();
+            th.getTransformer().setOutputProperty(OutputKeys.METHOD, "xml");
+            th.getTransformer().setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            th.getTransformer().setOutputProperty(OutputKeys.INDENT, "no");
             th.setResult(new StreamResult(out));
-            th.getTransformer().setParameter(OutputKeys.METHOD, "xml");
-            th.getTransformer().setParameter(OutputKeys.ENCODING, "UTF-8");
-            th.getTransformer().setParameter(OutputKeys.INDENT, "no");
 
             exportDocumentView(absPath, th, skipBinary, noRecurse);
         } catch (TransformerException te) {
@@ -1199,10 +1199,10 @@
         SAXTransformerFactory stf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
         try {
             TransformerHandler th = stf.newTransformerHandler();
+            th.getTransformer().setOutputProperty(OutputKeys.METHOD, "xml");
+            th.getTransformer().setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            th.getTransformer().setOutputProperty(OutputKeys.INDENT, "no");
             th.setResult(new StreamResult(out));
-            th.getTransformer().setParameter(OutputKeys.METHOD, "xml");
-            th.getTransformer().setParameter(OutputKeys.ENCODING, "UTF-8");
-            th.getTransformer().setParameter(OutputKeys.INDENT, "no");
 
             exportSystemView(absPath, th, skipBinary, noRecurse);
         } catch (TransformerException te) {

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java?view=diff&rev=533508&r1=533507&r2=533508
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
Sun Apr 29 07:14:54 2007
@@ -225,9 +225,9 @@
             TransformerHandler handler = stf.newTransformerHandler();
 
             Transformer transformer = handler.getTransformer();
-            transformer.setParameter(OutputKeys.METHOD, "xml");
-            transformer.setParameter(OutputKeys.ENCODING, "UTF-8");
-            transformer.setParameter(OutputKeys.INDENT, "no");
+            transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+            transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            transformer.setOutputProperty(OutputKeys.INDENT, "no");
 
             handler.setResult(new StreamResult(stream));
             return handler;

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/AbstractImportXmlTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/AbstractImportXmlTest.java?view=diff&rev=533508&r1=533507&r2=533508
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/AbstractImportXmlTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/AbstractImportXmlTest.java
Sun Apr 29 07:14:54 2007
@@ -417,9 +417,9 @@
         try {
             // disable pretty printing/default line wrapping!
             Transformer t = TransformerFactory.newInstance().newTransformer();
-            t.setParameter(OutputKeys.METHOD, "xml");
-            t.setParameter(OutputKeys.ENCODING, "UTF-8");
-            t.setParameter(OutputKeys.INDENT, "no");
+            t.setOutputProperty(OutputKeys.METHOD, "xml");
+            t.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+            t.setOutputProperty(OutputKeys.INDENT, "no");
             Source s = new DOMSource(document);
             Result r = new StreamResult(bos);
             t.transform(s, r);



Mime
View raw message