tmiller 01/06/27 06:30:43
Modified: java/src/org/apache/xalan/xsltc/trax
TransformerFactoryImpl.java
Log:
fixed bug with deriving translet name from
stylesheet name that included paths, e.g. /tmp/foo.xsl
Revision Changes Path
1.2 +4 -9
xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
Index: TransformerFactoryImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TransformerFactoryImpl.java 2001/06/26 17:19:58 1.1
+++ TransformerFactoryImpl.java 2001/06/27 13:30:43 1.2
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: TransformerFactoryImpl.java,v 1.1 2001/06/26 17:19:58 tmiller
Exp $
+ * @(#)$Id: TransformerFactoryImpl.java,v 1.2 2001/06/27 13:30:43 tmiller
Exp $
*
* The Apache Software License, Version 1.1
*
@@ -80,6 +80,7 @@
import org.apache.xalan.xsltc.Translet;
import org.apache.xalan.xsltc.compiler.XSLTC;
+import org.apache.xalan.xsltc.compiler.util.Util;
import org.apache.xalan.xsltc.runtime.AbstractTranslet;
import java.io.File;
@@ -263,14 +264,8 @@
if (inputStream != null) {
isSuccessful = xsltc.compile(inputStream, transletName);
} else if (stylesheetName != null ){
- int index = stylesheetName.indexOf('.');
- if (index > 0) {
- transletName = stylesheetName.substring(0,index);
- }
- else {
- // indexOf returns -1 if '.' is not present
- transletName = stylesheetName;
- }
+ transletName = Util.toJavaName(Util.noExtName(
+ Util.baseName(stylesheetName)));
try {
if (stylesheetName.startsWith("file:/")) {
isSuccessful = xsltc.compile(new URL(stylesheetName));
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]