You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by am...@apache.org on 2001/09/17 22:27:48 UTC
cvs commit: xml-xalan/test/java/src/org/apache/qetest/xslwrapper XsltcMainWrapper.java
amiro 01/09/17 13:27:48
Modified: test/java/src/org/apache/qetest/xslwrapper
XsltcMainWrapper.java
Log:
use the newer cmdline classes
Revision Changes Path
1.3 +14 -10 xml-xalan/test/java/src/org/apache/qetest/xslwrapper/XsltcMainWrapper.java
Index: XsltcMainWrapper.java
===================================================================
RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xslwrapper/XsltcMainWrapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XsltcMainWrapper.java 2001/05/15 19:41:57 1.2
+++ XsltcMainWrapper.java 2001/09/17 20:27:48 1.3
@@ -57,8 +57,8 @@
package org.apache.qetest.xslwrapper;
import org.apache.qetest.QetestUtils;
-import org.apache.xalan.xsltc.compiler.XSLTC;
-import org.apache.xalan.xsltc.runtime.DefaultRun;
+import org.apache.xalan.xsltc.cmdline.Compile;
+import org.apache.xalan.xsltc.cmdline.Transform;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -77,13 +77,13 @@
* that calls XSLTC API's directly.
*
* @author Shane Curcuru
- * @version $Id: XsltcMainWrapper.java,v 1.2 2001/05/15 19:41:57 amiro Exp $
+ * @version $Id: XsltcMainWrapper.java,v 1.3 2001/09/17 20:27:48 amiro Exp $
*/
public class XsltcMainWrapper extends TransformWrapperHelper
{
- protected static final String XSLTC_COMPILER_CLASS = "org.apache.xalan.xsltc.compiler.XSLTC";
- protected static final String XSLTC_RUNTIME_CLASS = "org.apache.xalan.xsltc.runtime.DefaultRun";
+ protected static final String XSLTC_COMPILER_CLASS = "org.apache.xalan.xsltc.cmdline.Compile";
+ protected static final String XSLTC_RUNTIME_CLASS = "org.apache.xalan.xsltc.cmdline.Transform";
/**
* Cached copy of newProcessor() Hashtable.
@@ -172,8 +172,8 @@
long xslBuild = 0;
long transform = 0;
- // java com.sun.xslt.compiler.XSLTC play1.xsl
- // java com.sun.xslt.runtime.DefaultRun play.xml play1 >stdout
+ // java com.sun.xslt.cmdline.Compile play1.xsl
+ // java com.sun.xslt.cmdline.Transform play.xml play1 >stdout
// Timed: compile stylesheet class from XSL file
@@ -192,14 +192,16 @@
args1[1] = "-d";
args1[2] = transletsdirName;
args1[3] = xslName;
+/* Shane said this didn't need to be done anymore
int idx = xslName.indexOf("file:////");
if (idx != -1){
xslName = new String(xslName.substring(8));
args1[3] = xslName;
}
+*/
startTime = System.currentTimeMillis();
/// Transformer transformer = factory.newTransformer(new StreamSource(xslName));
- XSLTC.main(args1);
+ Compile.main(args1);
xslBuild = System.currentTimeMillis() - startTime;
// Verify output file was created
@@ -217,7 +219,7 @@
// Timed: read/build xml, transform, and write results
/* TWA - We shouldn't use the -u option unless we are really using URLs.
-With or without the -u option, the files aree getting a file://// prefix
+With or without the -u option, the files are getting a file://// prefix
which caused them to be not found
*/
@@ -226,10 +228,12 @@
String[] args2 = new String[3];
args2[0] = "-s"; // Don't allow System.exit
args2[1] = xmlName;
+/* Shane said this doesn't need to be done anymore
int idx2 = xmlName.indexOf("file:////");
if (idx2 != -1){
args2[1] = new String(xmlName.substring(8));
}
+*/
args2[2] = baseName;// Just basename of the .class file, without the .class
// Note that . must be on CLASSPATH to work!
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -241,7 +245,7 @@
{
// Capture System.out into our byte array
System.setOut(new PrintStream(baos));
- DefaultRun.main(args2);
+ Transform.main(args2);
}
finally
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org