You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by vh...@apache.org on 2001/05/15 00:43:26 UTC
cvs commit: xml-batik/test-sources/org/apache/batik/test/xml XSLXMLReportConsumer.java
vhardy 01/05/14 15:43:25
Modified: test-sources/org/apache/batik/test/xml
XSLXMLReportConsumer.java
Log:
Changed to Xalan2.
Revision Changes Path
1.3 +16 -7 xml-batik/test-sources/org/apache/batik/test/xml/XSLXMLReportConsumer.java
Index: XSLXMLReportConsumer.java
===================================================================
RCS file: /home/cvs/xml-batik/test-sources/org/apache/batik/test/xml/XSLXMLReportConsumer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XSLXMLReportConsumer.java 2001/04/13 22:20:32 1.2
+++ XSLXMLReportConsumer.java 2001/05/14 22:43:20 1.3
@@ -9,12 +9,20 @@
package org.apache.batik.test.xml;
import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
-import org.apache.xalan.xslt.XSLTProcessorFactory;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerConfigurationException;
+
+/*import org.apache.xalan.xslt.XSLTProcessorFactory;
import org.apache.xalan.xslt.XSLTInputSource;
import org.apache.xalan.xslt.XSLTResultTarget;
-import org.apache.xalan.xslt.XSLTProcessor;
+import org.apache.xalan.xslt.XSLTProcessor;*/
import org.apache.batik.test.TestException;
@@ -24,7 +32,7 @@
* XML file and stores the result in a configurable directory.
*
* @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
- * @version $Id: XSLXMLReportConsumer.java,v 1.2 2001/04/13 22:20:32 vhardy Exp $
+ * @version $Id: XSLXMLReportConsumer.java,v 1.3 2001/05/14 22:43:20 vhardy Exp $
*/
public class XSLXMLReportConsumer
implements XMLTestReportProcessor.XMLReportConsumer {
@@ -79,11 +87,12 @@
*/
public void onNewReport(File xmlReport)
throws Exception{
- XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
+
+ TransformerFactory tFactory = TransformerFactory.newInstance();
+ Transformer transformer = tFactory.newTransformer(new StreamSource(stylesheet));
- processor.process(new XSLTInputSource(xmlReport.toURL().toString()),
- new XSLTInputSource(stylesheet),
- new XSLTResultTarget(createNewReportOutput().getAbsolutePath()));
+ transformer.transform(new StreamSource(xmlReport.toURL().toString()),
+ new StreamResult(new FileOutputStream(createNewReportOutput().getAbsolutePath())));
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org