ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs XSLTProcess.java
Date Sat, 20 Apr 2002 16:11:34 GMT
ehatcher    02/04/20 09:11:34

  Modified:    src/main/org/apache/tools/ant/taskdefs XSLTProcess.java
  Log:
  add support for multiple XMLCatalogs - sort of unfriendly to only allow one without giving
an error if more than one was specified :)
  
  Revision  Changes    Path
  1.43      +20 -11    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.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- XSLTProcess.java	15 Apr 2002 13:36:17 -0000	1.42
  +++ XSLTProcess.java	20 Apr 2002 16:11:34 -0000	1.43
  @@ -72,7 +72,7 @@
    * A Task to process via XSLT a set of XML documents. This is
    * useful for building views of XML based documentation.
    *
  - * @version $Revision: 1.42 $ 
  + * @version $Revision: 1.43 $ 
    *
    * @author <a href="mailto:kvisco@exoffice.com">Keith Visco</a>
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
  @@ -130,7 +130,7 @@
       private String outputtype = null;
       
       /** for resolving entities such as dtds */
  -    private XMLCatalog xmlCatalog;
  +    private XMLCatalog xmlCatalog = new XMLCatalog();
       
       /** Name of the TRAX Liason class */
       private static final String TRAX_LIAISON_CLASS =
  @@ -251,7 +251,7 @@
               stylesheetLoaded = false;
               baseDir = savedBaseDir;
           }
  -    } //-- execute
  +    }
       
       /**
        * Set whether to check dependencies, or always generate.
  @@ -260,7 +260,7 @@
        */
       public void setForce(boolean force) {
           this.force = force;
  -    } //-- setForce
  +    }
       
       /**
        * Set the base directory.
  @@ -269,7 +269,7 @@
        **/
       public void setBasedir(File dir) {
           baseDir = dir;
  -    } //-- setSourceDir
  +    }
       
       /**
        * Set the destination directory into which the XSL result
  @@ -278,7 +278,7 @@
        **/
       public void setDestdir(File dir) {
           destDir = dir;
  -    } //-- setDestDir
  +    }
       
       /**
        * Set the desired file extension to be used for the target
  @@ -286,7 +286,7 @@
        **/
       public void setExtension(String name) {
           targetExtension = name;
  -    } //-- setDestDir
  +    }
       
       /**
        * Sets the file to use for styling relative to the base directory
  @@ -340,12 +340,12 @@
       }
       
       /**
  -     * store the xml catalog for resolving entities
  +     * Add the catalog to our internal catalog
        * 
        * @param xmlCatalog the XMLCatalog instance to use to look up DTDs
        */
  -    public void addXMLcatalog(XMLCatalog xmlCatalog) {
  -        this.xmlCatalog = xmlCatalog;
  +    public void addConfiguredXMLCatalog(XMLCatalog xmlCatalog) {
  +        this.xmlCatalog.addConfiguredXMLCatalog(xmlCatalog);
       }
       
       /**
  @@ -632,7 +632,16 @@
       public void setOutputtype(String type) {
           this.outputtype = type;
       }
  -    
  +
  +    /**
  +     * Initialize internal instance of XMLCatalog
  +     */
  +    public void init() throws BuildException {
  +        super.init();
  +
  +        xmlCatalog.setProject(project);
  +    }
  +
       /**
        * Loads the stylesheet and set xsl:param parameters.
        *
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message