ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13859] - XSLT: processing multiple files is broken
Date Thu, 24 Oct 2002 04:35:28 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13859>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13859

XSLT: processing multiple files is broken





------- Additional Comments From elkner@linofee.org  2002-10-24 04:35 -------
Why not to add the following feature? :

--- jakarta-ant-1.5.1/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java	
Wed Oct  2 17:09:03 2002
+++ ant-1.5.1/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java	Thu Oct 24
06:25:30 2002
@@ -153,6 +153,13 @@
     private boolean performDirectoryScan = true;
 
     /**
+     * Whether to reuse templates once loaded.
+     *
+     * @since Ant 1.5.2
+     */
+    private boolean optimized = true;
+
+    /**
      * Creates a new XSLTProcess Task.
      */
     public XSLTProcess() {
@@ -701,13 +708,35 @@
     }
 
     /**
+     * Whether to reuse stylesheets once loaded. Default: <code>true</code>
+     *
+     * @param value  <code>true|false</code>
+     */
+    public void setOptimized(String value) {
+		if ("true".equals(value)) {
+			optimized = true;
+		} else if ("false".equals(value)) {
+			optimized = false;
+		} else {
+			log("Unknown value \"" + value + "\" ignored.", Project.MSG_WARN);
+		}
+	}
+
+    /**
+     * @return whether a stylesheet is reused once loaded.
+     */
+    public String getOptimized() {
+		return optimized ? "true" : "false";
+	}
+
+    /**
      * Loads the stylesheet and set xsl:param parameters.
      *
      * @param stylesheet the file form which to load the stylesheet.
      * @exception BuildException if the stylesheet cannot be loaded.
      */
     protected void configureLiaison(File stylesheet) throws BuildException {
-        if (stylesheetLoaded) {
+        if (stylesheetLoaded && optimized) {
             return;
         }
         stylesheetLoaded = true;


This shouldn´t hurt anybody, but help a lot of people!

Regards,
jens.

--
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