ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional XalanLiaison.java
Date Thu, 03 Aug 2000 09:34:09 GMT
bodewig     00/08/03 02:34:08

  Modified:    src/main/org/apache/tools/ant/taskdefs XSLTProcess.java
               src/main/org/apache/tools/ant/taskdefs/optional
                        XalanLiaison.java
  Log:
  Added missing dot to default extension in <style>, ensured Xalan gets
  infile as a file:// URL.
  Submitted by:	Brian Zimmer <bzimmer@ignitemedia.com>
  
  Revision  Changes    Path
  1.8       +2 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSLTProcess.java	2000/07/25 08:30:37	1.7
  +++ XSLTProcess.java	2000/08/03 09:34:03	1.8
  @@ -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.7 $ $Date: 2000/07/25 08:30:37 $
  + * @version $Revision: 1.8 $ $Date: 2000/08/03 09:34:03 $
    */
   public class XSLTProcess extends MatchingTask {
   
  @@ -94,7 +94,7 @@
   
       private File xslFile = null;
   
  -    private String targetExtension = "html";
  +    private String targetExtension = ".html";
   
       private XSLTLiaison liaison;
   
  
  
  
  1.3       +11 -3     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java
  
  Index: XalanLiaison.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanLiaison.java	2000/06/23 21:18:02	1.2
  +++ XalanLiaison.java	2000/08/03 09:34:05	1.3
  @@ -64,10 +64,12 @@
   /**
    *
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
  - * @version $Revision: 1.2 $ $Date: 2000/06/23 21:18:02 $
  + * @version $Revision: 1.3 $ $Date: 2000/08/03 09:34:05 $
    */
   public class XalanLiaison implements XSLTLiaison {
   
  +    protected final static String FILEURL = "file:";
  +
       XSLTProcessor processor;
       XSLTInputSource xslSheet;
   
  @@ -76,12 +78,18 @@
       }
   
       public void setStylesheet(String fileName) throws Exception {
  -      xslSheet = new XSLTInputSource (fileName);
  +        xslSheet = new XSLTInputSource (normalize(fileName));
       };
   
       public void transform(String infile, String outfile) throws Exception {
  -      processor.process(new XSLTInputSource(infile), xslSheet,
  +        processor.process(new XSLTInputSource(normalize(infile)), xslSheet,
                           new XSLTResultTarget(outfile));
       }
   
  +    protected String normalize(String fileName) {
  +        if(fileName != null && !fileName.startsWith(FILEURL)) {
  +            return FILEURL + fileName;
  +        }
  +        return fileName;
  +    }
   } //-- XalanLiaison
  
  
  

Mime
View raw message