cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/webapp/WEB-INF cocoon.xconf
Date Wed, 09 Jun 2004 09:41:16 GMT
cziegeler    2004/06/09 02:41:16

  Modified:    src/java/org/apache/cocoon/components/treeprocessor
                        DefaultTreeBuilder.java
                        AbstractParentProcessingNodeBuilder.java
                        TreeProcessor.java TreeBuilder.java
               .        status.xml
               src/java/org/apache/cocoon Constants.java
               src/webapp/WEB-INF cocoon.xconf
  Added:       src/java/org/apache/cocoon/components/treeprocessor
                        sitemap-language.xml
  Removed:     src/java/org/apache/cocoon/components/treeprocessor
                        treeprocessor-builtins.xml
  Log:
   Add sitemap versioning support to tree processor and remove unused
   support for other tree based languages.
  Set cocoon.xconf version to 2.2
  
  Revision  Changes    Path
  1.10      +76 -46    cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java
  
  Index: DefaultTreeBuilder.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultTreeBuilder.java	5 Jun 2004 08:18:50 -0000	1.9
  +++ DefaultTreeBuilder.java	9 Jun 2004 09:41:15 -0000	1.10
  @@ -29,6 +29,7 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.configuration.DefaultConfiguration;
   import org.apache.avalon.framework.configuration.NamespacedSAXConfigurationHandler;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
  @@ -100,12 +101,6 @@
   
       protected String namespace;
   
  -    protected String parameterElement;
  -
  -    protected String languageName;
  -
  -    protected String fileName;
  -
       /** Nodes gone through setupNode() that implement Initializable */
       private List initializableNodes = new ArrayList();
   
  @@ -122,44 +117,51 @@
       private Map registeredNodes = new HashMap();
   
   
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
  +     */
       public void contextualize(Context context) throws ContextException {
           this.context = context;
       }
   
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
  +     */
       public void compose(ComponentManager manager) throws ComponentException {
           this.parentManager = manager;
       }
   
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.framework.component.Recomposable#recompose(org.apache.avalon.framework.component.ComponentManager)
  +     */
       public void recompose(ComponentManager manager) throws ComponentException {
           this.parentManager = manager;
       }
   
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.excalibur.component.RoleManageable#setRoleManager(org.apache.avalon.excalibur.component.RoleManager)
  +     */
       public void setRoleManager(RoleManager rm) {
           this.parentRoleManager = rm;
       }
   
  -    /**
  -     * Configurable
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
        */
       public void configure(Configuration config) throws ConfigurationException {
           this.configuration = config;
  -
  -        this.languageName = config.getAttribute("name");
  -        if (this.getLogger().isDebugEnabled()) {
  -            getLogger().debug("Configuring Builder for language : " + this.languageName);
  -        }
  -
  -        this.fileName = config.getChild("file").getAttribute("name");
  -
  -        this.namespace = config.getChild("namespace").getAttribute("uri", "");
  -
  -        this.parameterElement = config.getChild("parameter").getAttribute("element", "parameter");
       }
   
  +    /* (non-Javadoc)
  +     * @see org.apache.cocoon.components.treeprocessor.TreeBuilder#setAttribute(java.lang.String,
java.lang.Object)
  +     */
       public void setAttribute(String name, Object value) {
           this.attributes.put(name, value);
       }
       
  +    /* (non-Javadoc)
  +     * @see org.apache.cocoon.components.treeprocessor.TreeBuilder#getAttribute(java.lang.String)
  +     */
       public Object getAttribute(String name) {
           return this.attributes.get(name);
       }
  @@ -212,7 +214,8 @@
        *
        * @return a selector for node builders
        */
  -    protected ComponentSelector createBuilderSelector() throws Exception {
  +    protected ComponentSelector createBuilderSelector(String sitemapVersion) 
  +    throws Exception {
   
           // Create the NodeBuilder selector.
           ExcaliburComponentSelector selector = new ExtendedComponentSelector() {
  @@ -225,41 +228,62 @@
               }
           };
   
  -        // Automagically initialize the selector
  +        // Merge configuration for tree builder from
  +        // <nodes> and <nodes-{sitemapVersion}>
  +        final Configuration base = this.configuration.getChild("nodes");
  +        final Configuration layer = this.configuration.getChild("nodes-" + sitemapVersion);
  +        if ( layer != null ) {
  +            final DefaultConfiguration merged =
  +                  new DefaultConfiguration( base.getName(),
  +                                      "Merged [layer: " + layer.getLocation()
  +                                      + ", base: " + base.getLocation() + "]" );
  +            merged.addAllChildren(base);
  +            final Configuration[] lc = layer.getChildren();
  +            for( int i = 0; i < lc.length; i++ ) {
  +                final String nodeName = lc[i].getAttribute("name");
  +                final Configuration[] bc = base.getChildren();
  +                boolean found = false;
  +                int m = 0;
  +                while ( m < bc.length && ! found ) {
  +                    if ( nodeName.equals(bc[m].getAttribute("name")) ) {
  +                        found = true;
  +                    } else {
  +                        m++;
  +                    }
  +                }
  +                if ( found ) {
  +                    merged.removeChild( bc[m] );
  +                }
  +                merged.addChild( lc[i] );
  +            }
  +        }
  +        // Automagically initialize the selector        
           LifecycleHelper.setupComponent(selector,
               getLogger(),
               this.context,
               this.manager,
               this.roleManager,
  -            this.configuration.getChild("nodes")
  +            base
           );
   
           return selector;
       }
   
  +    /* (non-Javadoc)
  +     * @see org.apache.cocoon.components.treeprocessor.TreeBuilder#setProcessor(org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor)
  +     */
       public void setProcessor(ConcreteTreeProcessor processor) {
           this.processor = processor;
       }
   
  +    /* (non-Javadoc)
  +     * @see org.apache.cocoon.components.treeprocessor.TreeBuilder#getProcessor()
  +     */
       public ConcreteTreeProcessor getProcessor() {
           return this.processor;
       }
   
       /**
  -     * Returns the language that is being built (e.g. "sitemap").
  -     */
  -    public String getLanguage() {
  -        return this.languageName;
  -    }
  -
  -    /**
  -     * Returns the name of the parameter element.
  -     */
  -    public String getParameterName() {
  -        return this.parameterElement;
  -    }
  -
  -    /**
        * Register a <code>ProcessingNode</code> under a given name.
        * For example, <code>ResourceNodeBuilder</code> stores here the <code>ProcessingNode</code>s
        * it produces for use by sitemap pipelines. This allows to turn the tree into a graph.
  @@ -354,23 +378,29 @@
               SourceUtil.toSAX( source, handler );
               Configuration treeConfig = handler.getConfiguration();
   
  -            return build(treeConfig);
  +            this.namespace = treeConfig.getNamespace();
  +            
  +            // get the namespace version
  +            final int pos = this.namespace.lastIndexOf('/');
  +            if ( pos == -1 ) {
  +                throw new ProcessingException("Namespace " + this.namespace + " does not
have a version number.");
  +            }
  +            if ( !this.namespace.substring(0, pos).equals("http://apache.org/cocoon/sitemap")
) {
  +                throw new ProcessingException("Namespace " + this.namespace + " is not
a valid sitemap namespace.");                
  +            }            
  +            return build(treeConfig, this.namespace.substring(pos+1));
           } catch (ProcessingException e) {
               throw e;
           } catch(Exception e) {
  -            throw new ProcessingException("Failed to load " + this.languageName + " from
" +
  +            throw new ProcessingException("Failed to load sitemap from " +
                   source.getURI(), e);
           }
       }
   
  -    public String getFileName() {
  -        return this.fileName;
  -    }
  -
       /**
        * Build a processing tree from a <code>Configuration</code>.
        */
  -    public ProcessingNode build(Configuration tree) throws Exception {
  +    protected ProcessingNode build(Configuration tree, String sitemapVersion) throws Exception
{
   
           this.roleManager = createRoleManager();
   
  @@ -384,7 +414,7 @@
               null // configuration
           );
   
  -        this.builderSelector = createBuilderSelector();
  +        this.builderSelector = createBuilderSelector(sitemapVersion);
   
           // Calls to getRegisteredNode() are forbidden
           this.canGetNode = false;
  @@ -465,7 +495,7 @@
        */
       protected Map getParameters(Configuration config) throws ConfigurationException {
   
  -        Configuration[] children = config.getChildren(this.parameterElement);
  +        Configuration[] children = config.getChildren("parameter");
   
           if (children.length == 0) {
               // Parameters are only the component's location
  
  
  
  1.4       +3 -3      cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNodeBuilder.java
  
  Index: AbstractParentProcessingNodeBuilder.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNodeBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractParentProcessingNodeBuilder.java	5 Mar 2004 13:02:51 -0000	1.3
  +++ AbstractParentProcessingNodeBuilder.java	9 Jun 2004 09:41:15 -0000	1.4
  @@ -90,8 +90,8 @@
       }
   
       protected boolean isParameter(Configuration config) throws ConfigurationException {
  -        String name = config.getName();
  -        if (name.equals(this.treeBuilder.getParameterName())) {
  +        final String name = config.getName();
  +        if (name.equals("parameter")) {
               if (this.hasParameters()) {
                   return true;
               } else {
  
  
  
  1.36      +44 -45    cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
  
  Index: TreeProcessor.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- TreeProcessor.java	6 Jun 2004 11:40:34 -0000	1.35
  +++ TreeProcessor.java	9 Jun 2004 09:41:15 -0000	1.36
  @@ -66,7 +66,7 @@
                  Initializable {
   
       private static final String XCONF_URL =
  -        "resource://org/apache/cocoon/components/treeprocessor/treeprocessor-builtins.xml";
  +        "resource://org/apache/cocoon/components/treeprocessor/sitemap-language.xml";
   
       /** The parent TreeProcessor, if any */
       protected TreeProcessor parent;
  @@ -80,11 +80,8 @@
       /** The role manager */
       protected RoleManager roleManager;
   
  -    /** The language used by this processor */
  -    protected String language;
  -
  -    /** Selector of TreeBuilders, the hint is the language name */
  -    protected ExtendedComponentSelector builderSelector;
  +    /** Sitemap TreeBuilder */
  +    protected TreeBuilder treeBuilder;
   
       /** Last modification time */
       protected long lastModified = 0;
  @@ -113,13 +110,13 @@
       /** The actual processor (package-private as needs to be accessed by ConcreteTreeProcessor)
*/
       ConcreteTreeProcessor concreteProcessor;
   
  +    /** The tree builder configuration */
  +    private Configuration treeBuilderConfiguration;
  +    
       /**
        * Create a TreeProcessor.
        */
       public TreeProcessor() {
  -        // Language can be overriden in the configuration.
  -        this.language = "sitemap";
  -
           this.checkReload = true;
           this.lastModifiedDelay = 1000;
       }
  @@ -133,14 +130,13 @@
                               String prefix) 
       throws Exception {
           this.parent = parent;
  -        this.language = (language == null) ? parent.language : language;
   
           // Copy all that can be copied from the parent
           this.enableLogging(parent.getLogger());
           this.context = parent.context;
           this.roleManager = parent.roleManager;
           this.source = sitemapSource;
  -        this.builderSelector = parent.builderSelector;
  +        this.treeBuilderConfiguration = parent.treeBuilderConfiguration;
           this.checkReload = checkReload;
           this.lastModifiedDelay = parent.lastModifiedDelay;
           
  @@ -152,6 +148,7 @@
           ContainerUtil.enableLogging(this.environmentHelper, this.getLogger());
           ContainerUtil.service(this.environmentHelper, new ComponentManagerWrapper(this.manager));
           this.environmentHelper.changeContext(sitemapSource, prefix);
  +        this.createTreeBuilder();
       }
   
       /**
  @@ -205,11 +202,13 @@
   
       /** 
        * Configure the tree processor:
  -     * <processor>
  -     *   <reload delay="10"/>
  -     *   <root-language name="sitemap"/>
  -     *   <language>...</language>
  -     * </processor>
  +     * &lt;processor file="{Location of the sitemap}" 
  +     *               check-reload="{true|false}"
  +     *               config="{Location of sitemap tree processor config}&gt;
  +     *   &lt;reload delay="10"/&gt;
  +     * &lt;/processor&gt;
  +     * 
  +     * Only the file attribute is required; everything else is optional.
        * 
        * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
        */
  @@ -218,11 +217,6 @@
           this.fileName = config.getAttribute("file", null);
           this.checkReload = config.getAttributeAsBoolean("check-reload", true);
   
  -        Configuration rootLangConfig = config.getChild("root-language", false);
  -        if (rootLangConfig != null) {
  -            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);
  @@ -231,13 +225,12 @@
           this.lastModifiedDelay = config.getChild("reload").getAttributeAsLong("delay",
1000L);
   
           // Read the builtin languages definition file
  -        Configuration builtin;
           try {
               Source source = this.resolver.resolveURI( xconfURL );
               try {
                   SAXConfigurationHandler handler = new SAXConfigurationHandler();
                   SourceUtil.toSAX( new ComponentManagerWrapper(this.manager), source, null,
handler);
  -                builtin = handler.getConfiguration();
  +                this.treeBuilderConfiguration = handler.getConfiguration();
               } finally {
                   this.resolver.release( source );
               }
  @@ -246,23 +239,34 @@
               throw new ConfigurationException(msg, e);
           }
   
  -        // Create a selector for tree builders of all languages
  -        this.builderSelector = new ExtendedComponentSelector(Thread.currentThread().getContextClassLoader());
  +        this.createTreeBuilder();
  +    }
  +
  +    /**
  +     * Create a new tree builder for this sitemap
  +     */
  +    protected void createTreeBuilder() 
  +    throws ConfigurationException {
  +        // Create a builder for the sitemap language
           try {
  -            LifecycleHelper.setupComponent(this.builderSelector,
  +            this.treeBuilder = (TreeBuilder)Thread.currentThread()
  +                    .getContextClassLoader()
  +                    .loadClass("org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage").newInstance();
  +
  +            LifecycleHelper.setupComponent(this.treeBuilder,
                   getLogger(),
                   this.context,
                   this.manager,
                   this.roleManager,
  -                builtin
  +                this.treeBuilderConfiguration
               );
           } catch(ConfigurationException ce) {
               throw ce;
           } catch(Exception e) {
  -            throw new ConfigurationException("Could not setup builder selector", e);
  +            throw new ConfigurationException("Could not setup sitemap builder.", e);
           }
       }
  -
  +    
       /**
        * Process the given <code>Environment</code> producing the output.
        * @return If the processing is successfull <code>true</code> is returned.
  @@ -362,7 +366,6 @@
           long startTime = System.currentTimeMillis();
   
           // Get a builder
  -        TreeBuilder builder = (TreeBuilder)this.builderSelector.select(this.language);
           ConcreteTreeProcessor newProcessor = new ConcreteTreeProcessor(this);
           long newLastModified;
           this.setupLogger(newProcessor);
  @@ -374,12 +377,12 @@
           // in the process of initialization.
           EnvironmentHelper.enterProcessor(this, new ComponentManagerWrapper(this.manager),
env);
           try {
  -            if (builder instanceof Recomposable) {
  -                ((Recomposable)builder).recompose(this.manager);
  +            if (this.treeBuilder instanceof Recomposable) {
  +                ((Recomposable)this.treeBuilder).recompose(this.manager);
               }
  -            builder.setProcessor(newProcessor);
  +            this.treeBuilder.setProcessor(newProcessor);
               if (this.fileName == null) {
  -                this.fileName = builder.getFileName();
  +                this.fileName = "sitemap.xmap";
               }
   
               if (this.source == null) {
  @@ -388,12 +391,11 @@
               
               newLastModified = this.source.getLastModified();
   
  -            ProcessingNode root = builder.build(this.source);
  +            ProcessingNode root = this.treeBuilder.build(this.source);
   
  -            newProcessor.setProcessorData(builder.getSitemapComponentManager(), root, builder.getDisposableNodes());
  +            newProcessor.setProcessorData(this.treeBuilder.getSitemapComponentManager(),
root, this.treeBuilder.getDisposableNodes());
           } finally {
               EnvironmentHelper.leaveProcessor();
  -            this.builderSelector.release(builder);
           }
   
           if (getLogger().isDebugEnabled()) {
  @@ -419,14 +421,11 @@
       public void dispose() {
           // Dispose the concrete processor. No need to check for existing requests, as there
           // are none when a TreeProcessor is disposed.
  -        if (this.concreteProcessor != null) {
  -          this.concreteProcessor.dispose();
  -        }
  +        ContainerUtil.dispose(this.concreteProcessor);
  +        this.concreteProcessor = null;
   
  -        if (this.parent == null) {
  -            // root processor : dispose the builder selector
  -            this.builderSelector.dispose();
  -        }
  +        ContainerUtil.dispose(this.treeBuilder);
  +        this.treeBuilder = null;
   
   	    if ( this.manager != null ) {
   	        if ( this.source != null ) {
  
  
  
  1.6       +2 -16     cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeBuilder.java
  
  Index: TreeBuilder.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeBuilder.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TreeBuilder.java	5 Jun 2004 08:18:50 -0000	1.5
  +++ TreeBuilder.java	9 Jun 2004 09:41:15 -0000	1.6
  @@ -36,16 +36,6 @@
       ConcreteTreeProcessor getProcessor();
   
       /**
  -     * Returns the language that is being built (e.g. "sitemap").
  -     */
  -    String getLanguage();
  -
  -    /**
  -     * Returns the name of the parameter element.
  -     */
  -    String getParameterName();
  -
  -    /**
        * Register a <code>ProcessingNode</code> under a given name.
        * For example, <code>ResourceNodeBuilder</code> stores here the <code>ProcessingNode</code>s
        * it produces for use by sitemap pipelines. This allows to turn the tree into a graph.
  @@ -65,13 +55,9 @@
       String getNamespace();
   
       /**
  -     * Build a processing tree from a <code>Configuration</code>.
  +     * Build a processing tree from a <code>Source</code>.
        */
  -    ProcessingNode build(Configuration tree) throws Exception;
  -
       ProcessingNode build(Source source) throws Exception;
  -
  -    String getFileName();
   
       /**
        * Return the list of <code>ProcessingNodes</code> part of this tree that
are
  
  
  
  1.1                  cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap-language.xml
  
  Index: sitemap-language.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 1999-2004 The Apache Software Foundation
  
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
        http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  
  <!DOCTYPE sitemap-language [
    <!ELEMENT sitemap-language (parameter, roles, nodes)>
    <!ELEMENT roles (role+)>
    <!ELEMENT role (hint*)>
    <!ATTLIST role
      name CDATA #REQUIRED
      shorthand CDATA #REQUIRED
      default-class CDATA #REQUIRED
    >
    <!ELEMENT hint EMPTY>
    <!ATTLIST hint
      shorthand CDATA #REQUIRED
      class CDATA #REQUIRED
    >
    <!ELEMENT nodes (node+)>
    <!ELEMENT node (allowed-children*, ignored-children*, forbidden-children*)>
    <!ATTLIST node
      name CDATA #REQUIRED
      builder CDATA #REQUIRED
    >
    <!ELEMENT allowed-children (#PCDATA)>
    <!ELEMENT ignored-children (#PCDATA)>
    <!ELEMENT forbidden-children (#PCDATA)>
  ]>
  
  <sitemap-language>
  
      <!-- New roles available to components created within a sitemap (i.e. in <map:components>)
-->
      <roles>
        <role name="org.apache.cocoon.acting.ActionSelector"
              shorthand="actions"
              default-class="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector"/>
        
        <role name="org.apache.cocoon.selection.SelectorSelector"
              shorthand="selectors"
              default-class="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector"/>
        
        <role name="org.apache.cocoon.components.pipeline.ProcessingPipelineSelector"
              shorthand="pipes"
              default-class="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector"/>
  
        <role name="org.apache.cocoon.matching.MatcherSelector"
              shorthand="matchers"
              default-class="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector">
  
          <!-- since <map:components> is a regular xconf, we can define shorthand
for
               well-known implementations.
               
               The hint below allows the following to be written in <map:matchers> :
                 <regexp-uri-matcher name="regexp"/>
               in place of :
                 <map:matcher name="regexp" src="org.apache.cocoon.matching.RegexpURIMatcher"/>
            -->
          <hint shorthand="regexp-uri-matcher"
                class="org.apache.cocoon.matching.RegexpURIMatcher"/>
  
          <hint shorthand="wildcard-uri-matcher"
                class="org.apache.cocoon.matching.WildcardURIMatcher"/>
  
        </role>
        
        <role name="org.apache.cocoon.generation.GeneratorSelector"
              shorthand="generators"
              default-class="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector">
  
          <hint shorthand="file-generator"
                class="org.apache.cocoon.generation.FileGenerator"/>
  
        </role>
        
        <role name="org.apache.cocoon.transformation.TransformerSelector"
              shorthand="transformers"
              default-class="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector">
  
          <hint shorthand="XSLT-transformer"
                class="org.apache.cocoon.transformation.TraxTransformer"/>
  
          <hint shorthand="cinclude-transformer"
                class="org.apache.cocoon.transformation.CIncludeTransformer"/>
  
        </role>
        
        <role name="org.apache.cocoon.serialization.SerializerSelector"
              shorthand="serializers"
              default-class="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector"/>
        
        <role name="org.apache.cocoon.reading.ReaderSelector"
              shorthand="readers"
              default-class="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector"/>
            
        <role name="org.apache.cocoon.components.notification.NotifyingBuilder"
              shorthand="notifying-builder"
              default-class="org.apache.cocoon.components.notification.DefaultNotifyingBuilder"/>
 
  
      </roles>
      
      <!-- node definitions for the sitemap language 
           that apply to all version -->
      <nodes>
        <!-- A node has the following attributes :
             - name : the node name, given as a local name in the language namespace (no prefix)
             - builder : the class name of the ProcessingNodeBuilder for this node
             
             The contents of a node definition is the configuration of Configurable
             ProcessingNodeBuilders.
          -->
        
        <!-- Sitemap root node -->
        <node name="sitemap" builder="org.apache.cocoon.components.treeprocessor.sitemap.SitemapNodeBuilder">
          <allowed-children>components, views, action-sets, resources, pipelines, flow</allowed-children>
        </node>
      
        <node name="components" builder="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsNodeBuilder"/>
        
        <node name="pipelines" builder="org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNodeBuilder">
          <allowed-children>pipeline, handle-errors</allowed-children>
          <ignored-children>component-configurations</ignored-children>
        </node>
  
        <node name="components" builder="org.apache.cocoon.components.treeprocessor.sitemap.ComponentsNodeBuilder"/>
  
        <node name="flow" builder="org.apache.cocoon.components.treeprocessor.sitemap.FlowNodeBuilder"/>
  
        <node name="views" builder="org.apache.cocoon.components.treeprocessor.CategoryNodeBuilder"/>
        
        <node name="view" builder="org.apache.cocoon.components.treeprocessor.sitemap.ViewNodeBuilder"/>
        
        <node name="resources" builder="org.apache.cocoon.components.treeprocessor.CategoryNodeBuilder"/>
        
        <node name="resource" builder="org.apache.cocoon.components.treeprocessor.NamedContainerNodeBuilder"/>
  
        <node name="action-sets" builder="org.apache.cocoon.components.treeprocessor.CategoryNodeBuilder"/>
        
        <node name="action-set" builder="org.apache.cocoon.components.treeprocessor.sitemap.ActionSetNodeBuilder"/>
  
        <node name="pipeline" builder="org.apache.cocoon.components.treeprocessor.sitemap.PipelineNodeBuilder">
          <forbidden-children>sitemap, components, pipelines</forbidden-children>
        </node>
        
        <node name="match" builder="org.apache.cocoon.components.treeprocessor.sitemap.MatchNodeBuilder">
          <forbidden-children>sitemap, components, pipeline, handle-errors</forbidden-children>
        </node>
  
        <node name="select" builder="org.apache.cocoon.components.treeprocessor.sitemap.SelectNodeBuilder"/>
  
        <node name="act" builder="org.apache.cocoon.components.treeprocessor.sitemap.ActNodeBuilder">
          <forbidden-children>sitemap, components, pipeline, handle-errors</forbidden-children>
        </node>
  
        <node name="redirect-to" builder="org.apache.cocoon.components.treeprocessor.sitemap.RedirectToNodeBuilder"/>
        
        <node name="call" builder="org.apache.cocoon.components.treeprocessor.sitemap.CallNodeBuilder"/>
  
        <node name="mount" builder="org.apache.cocoon.components.treeprocessor.sitemap.MountNodeBuilder"/>
  
        <node name="read" builder="org.apache.cocoon.components.treeprocessor.sitemap.ReadNodeBuilder"/>
  
        <node name="aggregate" builder="org.apache.cocoon.components.treeprocessor.sitemap.AggregateNodeBuilder"/>
  
        <node name="generate" builder="org.apache.cocoon.components.treeprocessor.sitemap.GenerateNodeBuilder"/>
  
        <node name="transform" builder="org.apache.cocoon.components.treeprocessor.sitemap.TransformNodeBuilder"/>
  
        <node name="serialize" builder="org.apache.cocoon.components.treeprocessor.sitemap.SerializeNodeBuilder"/>
  
        <node name="script" builder="org.apache.cocoon.components.treeprocessor.sitemap.ScriptNodeBuilder"/>
  
        <node name="handle-errors" builder="org.apache.cocoon.components.treeprocessor.sitemap.HandleErrorsNodeBuilder"/>
  
      </nodes>
      <!-- You can add specific nodes for a specific sitemap version, using
           &lt;nodes-{version}&gt;
      -->
  
  </sitemap-language>
  
  
  
  1.360     +5 -1      cocoon-2.1/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.359
  retrieving revision 1.360
  diff -u -r1.359 -r1.360
  --- status.xml	8 Jun 2004 21:44:42 -0000	1.359
  +++ status.xml	9 Jun 2004 09:41:16 -0000	1.360
  @@ -206,6 +206,10 @@
     <changes>
   
    <release version="@version@" date="@date@">
  +   <action dev="CZ" type="fix">
  +     Add sitemap versioning support to tree processor and remove unused
  +     support for other tree based languages.
  +   </action>
      <action dev="ATC" type="add" due-to="Leszek Gawron">
        New Input modules: URLEncodeModule and URLDecodeModule
      </action>
  
  
  
  1.14      +2 -2      cocoon-2.1/src/java/org/apache/cocoon/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/Constants.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Constants.java	27 May 2004 13:14:36 -0000	1.13
  +++ Constants.java	9 Jun 2004 09:41:16 -0000	1.14
  @@ -60,7 +60,7 @@
       public static final String COMPLETE_NAME = properties.getProperty("fullname") + " "
+ VERSION;
   
       /** The version of the configuration schema */
  -    public static final String CONF_VERSION  = "2.1";
  +    public static final String CONF_VERSION  = "2.2";
   
       /** The year of the build */
       public static final String YEAR = properties.getProperty("year");
  
  
  
  1.49      +1 -2      cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- cocoon.xconf	8 Jun 2004 21:32:45 -0000	1.48
  +++ cocoon.xconf	9 Jun 2004 09:41:16 -0000	1.49
  @@ -15,7 +15,7 @@
     limitations under the License.
   -->
   
  -<cocoon version="2.1">
  +<cocoon version="2.2">
   
   <!--+
       |  This is the Apache Cocoon configuration file. This is the place
  @@ -43,7 +43,6 @@
     <sitemap
       file="context://sitemap.xmap"
       check-reload="yes"
  -    config="resource://org/apache/cocoon/components/treeprocessor/treeprocessor-builtins.xml"
       logger="sitemap"
     />
   
  
  
  

Mime
View raw message