ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs XSLTProcess.java
Date Fri, 16 Mar 2001 09:48:13 GMT
bodewig     01/03/16 01:48:13

  Modified:    docs/manual/CoreTasks style.html
               src/main/org/apache/tools/ant/taskdefs XSLTProcess.java
  Log:
  Make <style> search relative to the project's basedir first - if it
  cannot be found, fall back to the task's basedir and print a
  deprecation warning.
  
  Submitted by:	Jesse Glick <Jesse.Glick@netbeans.com>
  
  Revision  Changes    Path
  1.5       +4 -1      jakarta-ant/docs/manual/CoreTasks/style.html
  
  Index: style.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/style.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- style.html	2001/03/13 14:15:20	1.4
  +++ style.html	2001/03/16 09:48:12	1.5
  @@ -53,7 +53,10 @@
     <tr>
       <td valign="top">style</td>
       <td valign="top">name of the stylesheet to use - given either relative
  -      to the basedir attribute or as an absolute path.</td>
  +      to the project's basedir or as an absolute path
  +      <em><strong>DEPRECATED</strong> - can be specified as a path relative
  +          to the basedir attribute of this task as well</em>.
  +    </td>
       <td align="center" valign="top">Yes</td>
     </tr>
     <tr>
  
  
  
  1.18      +9 -2      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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XSLTProcess.java	2001/03/13 14:15:22	1.17
  +++ XSLTProcess.java	2001/03/16 09:48:12	1.18
  @@ -84,7 +84,7 @@
    * @author <a href="mailto:kvisco@exoffice.com">Keith Visco</a>
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
    * @author <a href="mailto:russgold@acm.org">Russell Gold</a>
  - * @version $Revision: 1.17 $ $Date: 2001/03/13 14:15:22 $
  + * @version $Revision: 1.18 $ $Date: 2001/03/16 09:48:12 $
    */
   public class XSLTProcess extends MatchingTask {
   
  @@ -153,7 +153,14 @@
           long styleSheetLastModified = 0;
           if (xslFile != null) {
               try {
  -                File file = project.resolveFile(xslFile, baseDir);
  +                File file = project.resolveFile(xslFile, project.getBaseDir());
  +
  +                if (!file.exists()) {
  +                    log("DEPRECATED - the style attribute should be relative to the project\'s");
  +                    log("             basedir, not the tasks\'s basedir.");
  +                    file = project.resolveFile(xslFile, baseDir);
  +                }
  +                
                   // Create a new XSL processor with the specified stylesheet
                   styleSheetLastModified = file.lastModified();
                   log( "Loading stylesheet " + file, Project.MSG_INFO);
  
  
  

Mime
View raw message