You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by ov...@apache.org on 2002/03/13 18:41:06 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor TreeProcessor.java
ovidiu 02/03/13 09:41:06
Modified: src/java/org/apache/cocoon/components/treeprocessor
TreeProcessor.java
Log:
Allow the configuration file to be passed in the "config" attribute of
the <sitemap> element.
Revision Changes Path
1.2 +6 -2 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
Index: TreeProcessor.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TreeProcessor.java 5 Mar 2002 08:26:22 -0000 1.1
+++ TreeProcessor.java 13 Mar 2002 17:41:06 -0000 1.2
@@ -97,7 +97,7 @@
* Interpreted tree-traversal implementation of a pipeline assembly language.
*
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
- * @version CVS $Id: TreeProcessor.java,v 1.1 2002/03/05 08:26:22 sylvain Exp $
+ * @version CVS $Id: TreeProcessor.java,v 1.2 2002/03/13 17:41:06 ovidiu Exp $
*/
public class TreeProcessor extends AbstractLoggable implements ThreadSafe, Processor,
@@ -230,6 +230,10 @@
this.language = rootLangConfig.getAttribute("name");
}
+ // Obtain the configuration file, or use the XCONF_URL if none
+ // is defined
+ String xconfURL = config.getAttribute("config", XCONF_URL);
+
// Reload check delay. Default is 1 second.
this.lastModifiedDelay = config.getChild("reload").getAttributeAsLong("delay", 1000L);
@@ -238,7 +242,7 @@
try {
URLFactory factory = (URLFactory)this.manager.lookup(URLFactory.ROLE);
- URLSource source = new URLSource(factory.getURL(XCONF_URL), this.manager);
+ URLSource source = new URLSource(factory.getURL(xconfURL), this.manager);
try {
SAXConfigurationHandler handler = new SAXConfigurationHandler();
source.toSAX(handler);
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org