blob: 813dda54dcf044b9fd34629a570522b0c5e63879 [file] [log] [blame]
<?xml version="1.0"?>
<!DOCTYPE tree-processor [
<!ELEMENT tree-processor (language+)>
<!ELEMENT language (namespace, file, parameter, roles, nodes)>
<!ATTLIST language
name CDATA #REQUIRED
class CDATA #REQUIRED
pool-min CDATA #IMPLIED
pool-max CDATA #IMPLIED
>
<!ELEMENT namespace EMPTY>
<!ATTLIST namespace uri CDATA #REQUIRED>
<!ELEMENT file EMPTY>
<!ATTLIST file name CDATA #REQUIRED>
<!ELEMENT parameter EMPTY>
<!ATTLIST parameter element CDATA #REQUIRED>
<!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)>
]>
<tree-processor>
<!-- The sitemap language.
The "class" attribute names the implementation of TreeBuilder to be used for this language
A language definition is a component of a ComponentSelector. Consequently, it can
have all attributes supported by components, including pool-settings.
Since it is unlikely that several sitemaps will be built simultaneously, the
pool-max is set to 1, meaning that only one builder is recycled.
-->
<language name="sitemap" class="org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage"
pool-min="1" pool-max="1">
<!-- Namespace for this language -->
<namespace uri="http://apache.org/cocoon/sitemap/1.0"/>
<!-- File name for files in this language, relative to the environment prefix -->
<file name="sitemap.xmap"/>
<!-- Description of the element for nodes parameters -->
<parameter element="parameter"/>
<!-- 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"/>
<hint shorthand="XSP-generator"
class="org.apache.cocoon.generation.ServerPagesGenerator"/>
</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 -->
<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>
</language>
</tree-processor>