Browse Source

Make <style> resolve the stylesheet file name the same way as all

other tasks do.

Try #2.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268806 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
2bc52047f2
1 changed files with 5 additions and 6 deletions
  1. +5
    -6
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java

+ 5
- 6
src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -154,10 +154,9 @@ public class XSLTProcess extends MatchingTask {
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 @@ public class XSLTProcess extends MatchingTask {
/**
* 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;
}

/**


Loading…
Cancel
Save