cziegeler    02/04/26 05:30:52

  Modified:    src/java/org/apache/cocoon/components/treeprocessor
                        TreeProcessor.java
               src/webapp/WEB-INF cocoon.xconf
  Log:
  Adding file attribute to configure the place of the sitemap in the cocoon.xconf again
  
  Revision  Changes    Path
  1.7       +16 -3     
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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TreeProcessor.java        26 Apr 2002 10:42:16 -0000      1.6
  +++ TreeProcessor.java        26 Apr 2002 12:30:52 -0000      1.7
  @@ -96,7 +96,7 @@
    * Interpreted tree-traversal implementation of a pipeline assembly language.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Sylvain Wallez</a>
  - * @version CVS $Id: TreeProcessor.java,v 1.6 2002/04/26 10:42:16 cziegeler Exp $
  + * @version CVS $Id: TreeProcessor.java,v 1.7 2002/04/26 12:30:52 cziegeler Exp $
    */
   
   public class TreeProcessor extends AbstractLoggable implements ThreadSafe, 
Processor,
  @@ -144,6 +144,12 @@
       /** The current language configuration */
       protected Configuration currentLanguage;
   
  +    /** The file to process */
  +    protected String fileName;
  +
  +    /** Check for reload? */
  +    protected boolean checkReload;
  +
       /**
        * Create a TreeProcessor.
        */
  @@ -214,7 +220,10 @@
       <language>...</language>
     </processor>
   */
  -    public void configure(Configuration config) throws ConfigurationException {
  +    public void configure(Configuration config)
  +    throws ConfigurationException {
  +        this.fileName = config.getAttribute("file", null);
  +        this.checkReload = config.getAttributeAsBoolean("check-reload", true);
   
           Configuration rootLangConfig = config.getChild("root-language", false);
           if (rootLangConfig != null) {
  @@ -330,10 +339,14 @@
                   ((Recomposable)builder).recompose(this.manager);
               }
               builder.setProcessor(this);
  +            if (this.fileName == null) {
  +                this.fileName = builder.getFileName();
  +            }
  +            System.out.println("Reading file: " + this.fileName);
   
               if (this.source == null) {
                   // FIXME : make the delay configurable
  -                this.source = new 
DelayedRefreshSourceWrapper(env.resolve(builder.getFileName()), 1000L);
  +                this.source = new 
DelayedRefreshSourceWrapper(env.resolve(this.fileName), 1000L);
               }
               root = builder.build(this.source);
   
  
  
  
  1.12      +1 -1      xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- cocoon.xconf      26 Apr 2002 10:42:17 -0000      1.11
  +++ cocoon.xconf      26 Apr 2002 12:30:52 -0000      1.12
  @@ -466,6 +466,6 @@
       and request processing is slightly faster than with the compiled engine thanks 
to
       the HotSpot VM.
     -->
  -  <sitemap logger="sitemap"/>
  +  <sitemap logger="sitemap" file="sitemap.xmap"/>
   
   </cocoon>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to