***************
*** 94,157 ****
   */
  
  public class XSLTProcess extends MatchingTask implements XSLTLogger {
- 
      private File destDir = null;
- 
      private File baseDir = null;
- 
      private String xslFile = null;
- 
      private String targetExtension = ".html";
      private Vector params = new Vector();
- 
      private File inFile = null;
- 
      private File outFile = null;
- 
      private String processor;
      private Path classpath = null;
      private XSLTLiaison liaison;
      private boolean stylesheetLoaded = false;
- 
      private boolean force = false;
- 
      private FileUtils fileUtils;
- 
      private String outputtype = null;
- 
      /**
       * Creates a new XSLTProcess Task.
       **/
      public XSLTProcess() {
          fileUtils = FileUtils.newFileUtils();
      } //-- XSLTProcess
- 
      /**
       * Executes the task.
       */
- 
      public void execute() throws BuildException {
          DirectoryScanner scanner;
          String[]         list;
          String[]         dirs;
- 
          if (xslFile == null) {
              throw new BuildException("no stylesheet specified", location);
          }
- 
          if (baseDir == null) {
              baseDir = project.resolveFile(".");
          }
- 
          liaison = getLiaison();
- 
          // check if liaison wants to log errors using us as logger
          if(liaison instanceof XSLTLoggerAware) {
              ((XSLTLoggerAware)liaison).setLogger(this);
          }
- 
          log("Using "+liaison.getClass().toString(), Project.MSG_VERBOSE);
- 
          File stylesheet = project.resolveFile(xslFile);
          if (!stylesheet.exists()) {
              stylesheet = fileUtils.resolveFile(baseDir, xslFile);
--- 93,162 ----
   */
  
  public class XSLTProcess extends MatchingTask implements XSLTLogger {
+     
      private File destDir = null;
+     
      private File baseDir = null;
+     
      private String xslFile = null;
+     
      private String targetExtension = ".html";
      private Vector params = new Vector();
+     
      private File inFile = null;
+     
      private File outFile = null;
+     
      private String processor;
      private Path classpath = null;
      private XSLTLiaison liaison;
      private boolean stylesheetLoaded = false;
+     
      private boolean force = false;
+     
      private FileUtils fileUtils;
+     
      private String outputtype = null;
+     
+     /** for resolving entities such as dtds */
+     private XCatalog xcatalog;
+     
+     private static final String TRAX_LIAISON_CLASS =
+                         "org.apache.tools.ant.taskdefs.optional.TraXLiaison";
+     
      /**
       * Creates a new XSLTProcess Task.
       **/
      public XSLTProcess() {
          fileUtils = FileUtils.newFileUtils();
      } //-- XSLTProcess
+     
      /**
       * Executes the task.
       */
+     
      public void execute() throws BuildException {
          DirectoryScanner scanner;
          String[]         list;
          String[]         dirs;
+         
          if (xslFile == null) {
              throw new BuildException("no stylesheet specified", location);
          }
+         
          if (baseDir == null) {
              baseDir = project.resolveFile(".");
          }
+         
          liaison = getLiaison();
+         
          // check if liaison wants to log errors using us as logger
          if(liaison instanceof XSLTLoggerAware) {
              ((XSLTLoggerAware)liaison).setLogger(this);
          }
+         
          log("Using "+liaison.getClass().toString(), Project.MSG_VERBOSE);
+         
          File stylesheet = project.resolveFile(xslFile);
          if (!stylesheet.exists()) {
              stylesheet = fileUtils.resolveFile(baseDir, xslFile);
***************
*** 202,214 ****
          }
          scanner = getDirectoryScanner(baseDir);
          log("Transforming into "+destDir, Project.MSG_INFO);
- 
          // Process all the files marked for styling
          list = scanner.getIncludedFiles();
          for (int i = 0;i < list.length; ++i) {
              process( baseDir, list[i], destDir, stylesheet );
          }
- 
          // Process all the directoried marked for styling
          dirs = scanner.getIncludedDirectories();
          for (int j = 0;j < dirs.length;++j){
--- 207,219 ----
          }
          scanner = getDirectoryScanner(baseDir);
          log("Transforming into "+destDir, Project.MSG_INFO);
+         
          // Process all the files marked for styling
          list = scanner.getIncludedFiles();
          for (int i = 0;i < list.length; ++i) {
              process( baseDir, list[i], destDir, stylesheet );
          }
+         
          // Process all the directoried marked for styling
          dirs = scanner.getIncludedDirectories();
          for (int j = 0;j < dirs.length;++j){
***************
*** 348,365 ****
      private void process(File baseDir, String xmlFile, File destDir,
                           File stylesheet)
          throws BuildException {
- 
          String fileExt=targetExtension;
          File   outFile=null;
          File   inFile=null;
- 
          try {
              long styleSheetLastModified = stylesheet.lastModified();
              inFile = new File(baseDir,xmlFile);
              int dotPos = xmlFile.lastIndexOf('.');
-             if(dotPos>0){
                  outFile = new File(destDir,xmlFile.substring(0,xmlFile.lastIndexOf('.'))+fileExt);
-             }else{
                  outFile = new File(destDir,xmlFile+fileExt);
              }
              if (force ||
--- 361,378 ----
      private void process(File baseDir, String xmlFile, File destDir,
                           File stylesheet)
          throws BuildException {
+         
          String fileExt=targetExtension;
          File   outFile=null;
          File   inFile=null;
+         
          try {
              long styleSheetLastModified = stylesheet.lastModified();
              inFile = new File(baseDir,xmlFile);
              int dotPos = xmlFile.lastIndexOf('.');
+             if (dotPos>0) {
                  outFile = new File(destDir,xmlFile.substring(0,xmlFile.lastIndexOf('.'))+fileExt);
+             } else {
                  outFile = new File(destDir,xmlFile+fileExt);
              }
              if (force ||
