bodewig 01/03/12 03:24:26
Modified: src/main/org/apache/tools/ant/taskdefs XSLTProcess.java
Log:
Make <style> resolve the stylesheet file name the same way as all
other tasks do.
Try #2.
Revision Changes Path
1.16 +6 -7
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
Index: XSLTProcess.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- XSLTProcess.java 2001/03/10 01:11:15 1.15
+++ XSLTProcess.java 2001/03/12 11:24:22 1.16
@@ -84,7 +84,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Keith Visco</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Sam Ruby</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Russell Gold</a>
- * @version $Revision: 1.15 $ $Date: 2001/03/10 01:11:15 $
+ * @version $Revision: 1.16 $ $Date: 2001/03/12 11:24:22 $
*/
public class XSLTProcess extends MatchingTask {
@@ -154,10 +154,9 @@
if (xslFile != null) {
try {
// Create a new XSL processor with the specified stylesheet
- File file = new File( baseDir, xslFile.toString() );
- styleSheetLastModified = file.lastModified();
- log( "Loading stylesheet " + file, Project.MSG_INFO);
- liaison.setStylesheet( file.toString() );
+ styleSheetLastModified = xslFile.lastModified();
+ log( "Loading stylesheet " + xslFile, Project.MSG_INFO);
+ liaison.setStylesheet( xslFile.toString() );
for(Enumeration e = params.elements();e.hasMoreElements();) {
Param p = (Param)e.nextElement();
liaison.addParam( p.getName(), p.getExpression() );
@@ -216,8 +215,8 @@
/**
* Sets the file to use for styling relative to the base directory.
*/
- public void setStyle(String xslFile) {
- this.xslFile = new File(xslFile);
+ public void setStyle(File xslFile) {
+ this.xslFile = xslFile;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]