ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional XalanLiaison.java XslpLiaison.java
Date Fri, 23 Jun 2000 21:18:15 GMT
rubys       00/06/23 14:18:13

  Modified:    src/main/org/apache/tools/ant/taskdefs XSLTProcess.java
               src/main/org/apache/tools/ant/taskdefs/optional
                        XalanLiaison.java XslpLiaison.java
  Log:
  Fine tune startup (handle liaison being present but processor not in
  classpath)
  
  Revision  Changes    Path
  1.3       +3 -3      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSLTProcess.java	2000/06/23 21:00:51	1.2
  +++ XSLTProcess.java	2000/06/23 21:18:00	1.3
  @@ -83,7 +83,7 @@
    *
    * @author <a href="mailto:kvisco@exoffice.com">Keith Visco</a>
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
  - * @version $Revision: 1.2 $ $Date: 2000/06/23 21:00:51 $
  + * @version $Revision: 1.3 $ $Date: 2000/06/23 21:18:00 $
    */
   public class XSLTProcess extends MatchingTask {
   
  @@ -127,10 +127,10 @@
           if (liaison == null) {
              try {
                  setProcessor("xslp");
  -           } catch (Exception e1) {
  +           } catch (Throwable e1) {
                  try {
                      setProcessor("xalan");
  -               } catch (Exception e2) {
  +               } catch (Throwable e2) {
                      throw new BuildException(e2);
                  }
              }
  
  
  
  1.2       +5 -2      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanLiaison.java	2000/06/23 16:47:11	1.1
  +++ XalanLiaison.java	2000/06/23 21:18:02	1.2
  @@ -64,19 +64,22 @@
   /**
    *
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
  - * @version $Revision: 1.1 $ $Date: 2000/06/23 16:47:11 $
  + * @version $Revision: 1.2 $ $Date: 2000/06/23 21:18:02 $
    */
   public class XalanLiaison implements XSLTLiaison {
   
       XSLTProcessor processor;
       XSLTInputSource xslSheet;
   
  +    public XalanLiaison() throws Exception {
  +      processor = XSLTProcessorFactory.getProcessor();
  +    }
  +
       public void setStylesheet(String fileName) throws Exception {
         xslSheet = new XSLTInputSource (fileName);
       };
   
       public void transform(String infile, String outfile) throws Exception {
  -      if (processor == null) processor = XSLTProcessorFactory.getProcessor();
         processor.process(new XSLTInputSource(infile), xslSheet,
                           new XSLTResultTarget(outfile));
       }
  
  
  
  1.2       +5 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java
  
  Index: XslpLiaison.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XslpLiaison.java	2000/06/23 16:47:11	1.1
  +++ XslpLiaison.java	2000/06/23 21:18:07	1.2
  @@ -65,20 +65,23 @@
   /**
    *
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
  - * @version $Revision: 1.1 $ $Date: 2000/06/23 16:47:11 $
  + * @version $Revision: 1.2 $ $Date: 2000/06/23 21:18:07 $
    */
   public class XslpLiaison implements XSLTLiaison {
   
       XSLProcessor processor;
       XSLStylesheet xslSheet;
   
  +    public XslpLiaison() {
  +      processor = new XSLProcessor();
  +    }
  +
       public void setStylesheet(String fileName) throws Exception {
         XSLReader xslReader = new XSLReader();
         xslSheet = xslReader.read( fileName );
       };
   
       public void transform(String infile, String outfile) throws Exception {
  -      if (processor == null) processor = new XSLProcessor();
         processor.process(infile, xslSheet, new FileWriter(outfile));
       }
   
  
  
  

Mime
View raw message