<?xml version="1.0" encoding="UTF-8"?>
<!--
 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.
-->

<cocoon version="2.1">

 <!-- Some SDX configuration meta -->
 <sdx-framework role="fr.gouv.culture.sdx.framework.Framework" class="fr.gouv.culture.sdx.framework.FrameworkImpl" logger="sdx.framework"/>
 
 <oai role="fr.gouv.culture.oai.OAIComponent" class="fr.gouv.culture.oai.OAIComponentImpl" logger="oai"/>
 <!-- End of some SDX configuration meta -->


<!--+
    |  This is the Apache Cocoon configuration file. This is the place
    |  where you configure the components that Cocoon uses internally (stuff
    |  like the cache) or handles to the pipeline components
    |  (stuff like XML parsers or XSLT processors).
    +-->

<!-- =========================== Sitemap =============================== -->

  <!--+
      | New implementation of the sitemap. It is interpreted, so load times
      | are super-fast, and request processing is slightly faster than with
      | the compiled engine thanks to the HotSpot VM.
      |
      | Reloading of the sitemap:
      |   The check-reload attribute determines if the sitemap is to be
      |   reloaded on change.
      |   Set to "no", the sitemap is generated once at startup.
      |   Set to "yes", the sitemap is regenerated if it changes.
      |
      | For development environment, set the check-reload to yes.
      | For production environment, it is advisable to set check-reload to no.
      +-->
  <sitemap
  		file="context://sitemap.xmap"
  		check-reload="yes"  
  		config="resource://org/apache/cocoon/components/treeprocessor/treeprocessor-builtins.xml"  
  		logger="sitemap"
  />
 
 
<!-- =================== Sitemap Input/Output Modules ====================== -->

  <!--+
      | InputModules are a replacement to reading values directly
      | e.g. from request parameters. By using this abstraction and
      | indirection, other components can be more generic and changes
      | to the application logic are easier.
      |
      | A number of components already use InputModules: the sitemap processor, 
      | flow, some matchers, the linkrewriting transformer, database actions
      | and more.
      |
      | For example the sitemap processor allows to obtain a value
      | named "foo" from an the InputModule for request parameters by
      | writing {request-param:foo} wherever a sitemap variable is
      | allowed. 
      |
      | Some InputModules need the help of other InputModules to
      | obtain values and only apply a function to the obtained value
      | or change the name of the attribute. These modules usually
      | carry "Meta" in their name. An example is the ChainMetaModule
      | which tries several other modules in turn until a non-null
      | value is obtained or all modules are tied.
	  |
      | For details and optional configuration parameters refer to the
      | accompanying javadocs.
      +-->
  <input-modules>
    <component-instance class="org.apache.cocoon.components.modules.input.RequestParameterModule" logger="core.modules.input" name="request-param"/>
    <component-instance class="org.apache.cocoon.components.modules.input.RawRequestParameterModule" logger="core.modules.input" name="raw-request-param"/>
    <!-- 2005-04-27 [FG] more cocoon input modules for SDX -->
    <component-instance logger="core.modules.input" name="global"           class="org.apache.cocoon.components.modules.input.GlobalInputModule"/>
    <component-instance logger="core.modules.input" name="request"          class="org.apache.cocoon.components.modules.input.RequestModule"/>
    <component-instance logger="core.modules.input" name="request-param"    class="org.apache.cocoon.components.modules.input.RequestParameterModule"/>
    <component-instance logger="core.modules.input" name="raw-request-param" class="org.apache.cocoon.components.modules.input.RawRequestParameterModule"/>
    <component-instance logger="core.modules.input" name="request-attr"     class="org.apache.cocoon.components.modules.input.RequestAttributeModule"/>
    <component-instance logger="core.modules.input" name="request-header"   class="org.apache.cocoon.components.modules.input.HeaderAttributeModule"/>
    <component-instance logger="core.modules.input" name="session-attr"     class="org.apache.cocoon.components.modules.input.SessionAttributeModule"/>
    <component-instance logger="core.modules.input" name="baselink"         class="org.apache.cocoon.components.modules.input.BaseLinkModule" />
    <component-instance logger="core.modules.input" name="system-property"  class="org.apache.cocoon.components.modules.input.SystemPropertyModule"/>
    <component-instance logger="core.modules.input" name="date"         class="org.apache.cocoon.components.modules.input.DateInputModule">
      <!-- <format>EEE, d MMM yyyy HH:mm:ss Z</format> -->
      <!--Eg: Mon, 28 Oct 2002 03:08:49 +1100 -->
    </component-instance>
    <component-instance logger="core.modules.input" name="realpath"     class="org.apache.cocoon.components.modules.input.RealPathModule"/> 
 </input-modules>

<!-- ================================= XML ================================ -->

  <!--+
      | Source Factories
      |
      | Each source factory adds a special uri schemes to the system.
      +-->
  <source-factories>
    <component-instance class="org.apache.excalibur.source.impl.ResourceSourceFactory" name="resource"/>
    <component-instance class="org.apache.cocoon.components.source.impl.ContextSourceFactory" name="context"/>
    <component-instance class="org.apache.cocoon.components.source.impl.SitemapSourceFactory" name="cocoon"/>
    <!-- The "file:" protocol is modifiable (can be written to) and traversable (directory structures
         can be crawled). -->
    <component-instance class="org.apache.excalibur.source.impl.FileSourceFactory" name="file"/>
    <component-instance class="org.apache.cocoon.components.source.impl.PartSourceFactory" name="upload"/>
    <!-- the "*" protocol handles all uri schemes that are not explicitely specified. This includes all
         JDK standard protocols. -->
    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>
    <component-instance class="org.apache.cocoon.components.source.impl.ModuleSourceFactory" name="module"/>
  <!--..... Start configuration from 'caching-source' -->


    <!--+
        | Caching source protocol.
        | This protocol extension implements a proxy-like source
        | that can cache the contents of its delegate source.
        | 
        | The uri syntax is as follows:
        | cached:subprotocol:/path[?cocoon:cache-expires=60][&cache-name=main]
        | 
        | Where: 
        | - 'cached' is the caching source protocol scheme name as defined below.
        | - 'subprotcol:/path' identifies the source to get the actual contents from
        |   eg. http://cocoon.apache.org/doco.html?version=1.2
        | - optional querystring parameters that start with 'cocoon:' represent special 
        |   instructions to pass to the implementation.
        |
        | The protocol can be parametrized as follows:
        | - 'async' (false). When this is set to true cached source contents are updated
        |   in the background.
        | - 'cache-role' (org.apache.cocoon.caching.Cache). Use this if you want to use
        |   a Cache other than the default one.
        | - 'refresher-role' (org.apache.cocoon.components.source.impl.Refresher). Use this
        |   if you wish to use a Refresher other than the default one.
        |   A Refresher is used when asynchronic caching is turned on. It is responsible for
        |   updating the cached contents in the background.
        | - 'default-expires' (-1). The expires value if it is not specified on the source
        |    itself.
        +-->
    <component-instance class="org.apache.cocoon.components.source.impl.CachingSourceFactory" logger="core.source.cached" name="cached">
      <!--
      <parameter name="async" value="true"/>
      <parameter name="cache-role" value="org.apache.cocoon.caching.Cache"/>
      <parameter name="refresher-role" value="org.apache.cocoon.components.source.impl.Refresher/Delay"/>
      <parameter name="default-expires" value="-1"/>
      -->
    </component-instance>
<!--..... End configuration from 'caching-source' -->
</source-factories>



  <!--+
      | Entity resolution catalogs
      |
      | verbosity:
      | The level of messages for status/debug (messages go to standard output)
      | The following messages are provided ...
      |  0 = none
      |  1 = ? (... not sure yet)
      |  2 = 1+, Loading catalog, Resolved public, Resolved system
      |  3 = 2+, Catalog does not exist, resolvePublic, resolveSystem
      |  10 = 3+, List all catalog entries when loading a catalog
      |    (Cocoon also logs the "Resolved public" messages.)
      |
      +-->
    <sdx-entity-resolver role="org.apache.excalibur.xml.EntityResolver" class="fr.gouv.culture.sdx.resolver.entity.SDXResolver" logger="sdx.framework.SDXResolver">
     <parameter name="verbosity" value="1"/>
    </sdx-entity-resolver>
 

<!--+
      | XML Parser
      |
      | Apache Cocoon requires a JAXP 1.1 parser. The default parser is
      | org.apache.excalibur.xml.impl.JaxpParser. 
      | Note: If you have problems because your servlet environment uses its
      | own parser not conforming to JAXP 1.1 try using the alternative
      | XercesParser instead of the JaxpParser. To activate the XercesParser,
      | change the class attribute to
      |   class="org.apache.excalibur.xml.impl.XercesParser"
      | You will also need to add a system property to your JVM,
      | probably on the startup of your servlet engine like this:
      | -Dorg.apache.excalibur.xml.sax.SAXParser=org.apache.excalibur.xml.impl.XercesParser
      |
      | Configuration parameters for the JaxpParser (not the XercesParser!):
      | - validate (boolean, default = false): should the parser validate
      |     parsed documents?
      |     Note: XML validation is only being used for the documentation build.
      |     (If you are going to use it elsewhere, then do so with caution.)
      |     You really should have validated all of your XML documents already,
      |     according to their proper DTD or schema. Do not expect Cocoon
      |     to do it.
      | - namespace-prefixes (boolean, default = false) : do we want
      |     namespaces declarations also as 'xmlns:' attributes?
      |     Note : setting this to true confuses some XSL processors
      |     (e.g. Saxon).
      | - stop-on-warning (boolean, default = true) : should the parser
      |     stop parsing if a warning occurs ?
      | - stop-on-recoverable-error (boolean, default = true) : should the
      |     parser stop parsing if a recoverable error occurs ?
      | - reuse-parsers (boolean, default = true) : do we want to reuse
      |     parsers or create a new parser for each parse ?
      |     Note : even if this parameter is true, parsers are not recycled
      |     in case of parsing errors : some parsers (e.g. Xerces) do not like
      |     to be reused after failure.
      | - sax-parser-factory (string, optional) : the name of the
      |     SAXParserFactory implementation class to be used instead of using
      |     the standard JAXP mechanism (SAXParserFactory.newInstance()). This
      |     allows to choose unambiguously the JAXP implementation to be used
      |     when several of them are available in the classpath.
      | - document-builder-factory (string, optional) : the name of the
      |     DocumentBuilderFactory implementation to be used (similar to
      |     sax-parser-factory for DOM).
      | - drop-dtd-comments : should comment() events from DTD's be dropped?
      |     Note: Since this implementation does not support the DeclHandler
      |     interface anyway, it is quite useless to only have the comments
      |     from DTD. And the comment events from the internal DTD subset
      |     would appear in the serialized output again.
      +-->
  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser" logger="core.xml-parser" pool-grow="4" pool-max="32" pool-min="8">
    <parameter name="validate" value="false"/>
    <parameter name="namespace-prefixes" value="false"/>
    <parameter name="stop-on-warning" value="true"/>
    <parameter name="stop-on-recoverable-error" value="true"/>
    <parameter name="reuse-parsers" value="false"/>
    <parameter name="drop-dtd-comments" value="true"/>
  </xml-parser>

  <!--+
      | XSLT Processor
      |
      | 'incremental-processing' (only works with Xalan) allows the XSLT
      | processor to start the output of the transformation as soon as possible.
      | if set to false, the transforer waits until the end of the
      | transformation to deliver the output.
      | WARNING: * if you enable incremental-processing, you should be aware of
      |            the following bug:
      |            http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13186
      |          * incremental-processing creates an additional, non-pooled thread.
      |          * using incremental-processing does not save memory, the input
      |            tree will still be build completely.
      |          * incremental processing is a 'static' thing in Xalan: if you
      |            enable it on one xslt-processor, enable it on all.
      +-->
  <xslt-processor logger="core.xslt-processor" pool-grow="2" pool-min="8" pool-max="64">
     <parameter name="use-store" value="true"/>
     <parameter name="incremental-processing" value="false"/>
  </xslt-processor>

  <!--+
      | XSLT Processor using xsltc from Xalan
      | For Interpreted Xalan use:
      | <transformer-factory>org.apache.xalan.processor.TransformerFactoryImpl</transformer-factory>
  <component class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl" logger="core.xslt-processor" role="org.apache.excalibur.xml.xslt.XSLTProcessor/xsltc">
     <parameter name="use-store" value="true"/>
     <parameter name="transformer-factory" value="org.apache.xalan.xsltc.trax.TransformerFactoryImpl"/>
  </component>
      +-->
  
  <!--+
      | Xalan XSLT Processor
  <component class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl" logger="core.xslt-processor" role="org.apache.excalibur.xml.xslt.XSLTProcessor/xalan">
     <parameter name="use-store" value="true"/>
     <parameter name="incremental-processing" value="false"/>
     <parameter name="transformer-factory" value="org.apache.xalan.processor.TransformerFactoryImpl"/>
  </component>
      +-->

  <!--+
      | Saxon XSLT Processor
      | For old (6.5.2) Saxon use:
      |  <parameter name="transformer-factory" value="com.icl.saxon.TransformerFactoryImpl"/>
      | For new (7.x?) Saxon use:
      |  <parameter name="transformer-factory" value="net.sf.saxon.TransformerFactoryImpl"/>
  <component logger="core.xslt-processor"
             role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon"
             class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl">
     <parameter name="use-store" value="true"/>
     <parameter name="transformer-factory" value="com.icl.saxon.TransformerFactoryImpl"/>
  </component>
  +-->
  <component class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl" logger="core.xslt-processor" role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon" pool-grow="2" pool-min="8" pool-max="32">
     <parameter name="use-store" value="true"/>
     <parameter name="incremental-processing" value="false"/>
     <parameter name="transformer-factory" value="com.icl.saxon.TransformerFactoryImpl"/>
  </component>

  <!-- Xpath Processor: -->
  <xpath-processor class="org.apache.excalibur.xml.xpath.XPathProcessorImpl" logger="core.xpath-processor"/>

  <!-- The XMLizers converts different mime-types to XML -->
  <xmlizer>
      <parser mime-type="text/xml" role="org.apache.excalibur.xml.sax.SAXParser"/>
  <!--..... Start configuration from 'tidy' -->
      <parser mime-type="text/html" role="org.apache.excalibur.xml.sax.SAXParser/HTML"/>
  <!--..... End configuration from 'tidy' -->
</xmlizer>


<!-- ============================ Object Stores =========================== -->

  <!--+
      | Transient Store: holds objects that don't have to survive shutdown
      |
      | Common configuration parameters:
      | maxobjects: Indicates how many objects will be hold in the cache.
      |    When the number of maxobjects has been reached. The last object
      |    in the cache will be thrown out.
      +-->
  <transient-store logger="core.store.transient">
    <parameter name="maxobjects" value="1000"/>
  </transient-store>
  
  <!--+
      | Store: generic store. The default implementation is an in-memory store
      | backed by a disk store (based on JCS). This forms a two-stage
      | cache composed of a fast in-memory MRU front-end and a persistent
      | back-end which stores the less-used objects.
      |
      | Common configuration parameters:
      | maxobjects: Indicates how many objects will be held in the cache.
      |    When the number of maxobjects has been reached. The last object
      |    in the cache will be thrown out.
      +-->
  <store logger="core.store">
    <parameter name="maxobjects" value="1000"/>
    <parameter name="use-cache-directory" value="true"/>
  </store>

  <!--+
      | Store Janitor: the store garbage collector and memory usage controller.
      |
      | WARNING: Be careful with the heapsize and freememory parameters.
      |           Wrong values can cause high cpu usage.
      |
      | Example configuration:
      | Jvm settings:
      |    -Xmx200000000
      | store-janitor settings:
      |    <parameter name="freememory" value="5000000"/>
      |    <parameter name="heapsize" value="196000000"/>
      |
      | It is recommended to have heapsize equal to -Xmx, especially on Sun's
      | JVM which are unable to shrink its heap once it grows above minimum.
      | Freememory should be greater than amount of memory necessary for normal
      | application operation.
      | BUT: The heap size of the memory of the JVM is a little bit less than
      |      the value you specify for -Xmx, so you have to set the heapsize
      |      for the store janitor to a value which is lower (2% less seems
      |      to be a working value).
      +-->
  <store-janitor logger="core.store.janitor">
     <!-- How much free memory shall be available in the jvm -->
     <parameter name="freememory" value="2048000"/>
     <!-- Indicates the limit of the jvm memory consumption. The default max
          heapsize for Sun's JVM is (almost) 64Mb -->
     <parameter name="heapsize" value="66600000"/>
     <!-- How often shall the cleanup thread check memory -->
     <parameter name="cleanupthreadinterval" value="10"/>
     <!-- Experimental adaptive algorithm for cleanup interval
     <parameter name="adaptivethreadinterval" value="true"/>
     -->
     <!-- Indicates the thread priority of the cleanup thread -->
     <parameter name="threadpriority" value="5"/>
     <!-- How much percent of the elements of each registered Store
          shall be removed when low on memory. Default 10% -->
     <parameter name="percent_to_free" value="10"/>
     <!-- Invoke the garbage collector when low memory is reached -->
     <parameter name="invokegc" value="false"/>
  </store-janitor>

<!-- ========================= Protocol Handlers =========================== -->


<!-- ================ Internationalization Catalogs =================== -->

  <!--+
      | I18n Bundle Factory
      |
      | BundleFactory loads Bundles with i18n resources for the given locale.
      | Bundles are loaded from the 'catalogue_location'. Bundle base name is
      | 'catalogue_name' value.
      | If 'cache-at-startup' is true then BundleFactory preloads bundles.
      +-->
  <i18n-bundles logger="core.i18n-bundles">
    <catalogue-name>messages</catalogue-name>
    <catalogue-location>context://samples/i18n/translations</catalogue-location>
    <cache-at-startup>true</cache-at-startup>
  </i18n-bundles>

<!-- ====================== System Components =========================== -->

  <!--+
      | The core classloader implementation
      +-->
  <classloader class="org.apache.cocoon.components.classloader.ClassLoaderManagerImpl" logger="core.classloader"/>

  <!--+
      | XML compiler/decompiler
      |
      | these components are used to process SAX events and produce a binary
      | representation that is much more compact and efficient for
      | subsequent parsing. These are used by the cache system to save
      | the intermediate results of the pipeline stages reducing the overhead
      | of xml parsing/serialization.
      +-->
  <xml-serializer class="org.apache.cocoon.components.sax.XMLByteStreamCompiler" logger="core.xml-serializer" pool-grow="4" pool-max="32" pool-min="8"/>
  <xml-deserializer class="org.apache.cocoon.components.sax.XMLByteStreamInterpreter" logger="core.xml-deserializer" pool-grow="4" pool-max="32" pool-min="8"/>

  <!--+
      | The Monitor keeps track on changes to a Resource.
      +-->
  <monitor logger="core.monitor">
    <thread frequency="10000" priority="5"/>
  </monitor>

  <!--+
      | The Cache Manager is a component that can be used to cache content.
      | It is currently used by the cinclude transformer
      +-->
  <component class="org.apache.cocoon.transformation.helpers.DefaultIncludeCacheManager" role="org.apache.cocoon.transformation.helpers.IncludeCacheManager">
    <!-- Set the preemptive-loader-url to a pipeline inside Cocoon that
         contains the preemptive loader action. The URL must be absolute! 
    <parameter name="preemptive-loader-url" 
               value="http://localhost:8080/cocoon/samples/cinclude/loader"/>
    -->
 </component>
 
 
 
<!--..... Start configuration from 'xsp-markup' -->

  <!--+
      | Logicsheets
      |
      | This section defines the XSP logicsheets. A logicsheet is a special
      | XSLT stylesheet used to translate user-defined dynamic markup into
      | equivalent XSP markup that embeds directives for a given markup
      | language.
      |
      | Logicsheets are the XSP equivalent of taglibs. For info about
      | the tags included in the default taglibs, please, refer to the
      | documentation.
      +-->
  <markup-languages>
    <xsp-language logger="core.markup.xsp" name="xsp">
      <parameter name="prefix" value="xsp"/>
      <parameter name="uri" value="http://apache.org/xsp"/>

      <!--+
          | Properties for the java language
          +-->
      <target-language name="java">
        <!-- SDX logicsheet -->
        <builtin-logicsheet>
          <parameter name="prefix" value="sdx"/>
          <parameter name="uri" value="http://www.culture.gouv.fr/ns/sdx/sdx"/>
          <parameter name="href" value="resource://fr/gouv/culture/sdx/logicsheet/sdx.xsl"/>
        </builtin-logicsheet>
                
        <!-- ESQL logicsheet -->		
        <builtin-logicsheet>
          <parameter name="prefix" value="esql"/>
          <parameter name="uri" value="http://apache.org/cocoon/SQL/v2"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/esql.xsl"/>
        </builtin-logicsheet> 

        <!-- Defines the XSP Core logicsheet for the Java language -->
        <parameter name="core-logicsheet" value="resource://org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl"/>

        <!-- The Request logicsheet: access request parameters -->
        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-request"/>
          <parameter name="uri" value="http://apache.org/xsp/request/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/request.xsl"/>
        </builtin-logicsheet>

        <!-- The Response logicsheet: access response parameters -->
        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-response"/>
          <parameter name="uri" value="http://apache.org/xsp/response/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/response.xsl"/>
        </builtin-logicsheet>

        <!-- The Session logicsheet: manages and access the session -->
        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-session"/>
          <parameter name="uri" value="http://apache.org/xsp/session/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/session.xsl"/>
        </builtin-logicsheet>

        <!-- The Cookie logicsheet: manages and access cookies  -->
        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-cookie"/>
          <parameter name="uri" value="http://apache.org/xsp/cookie/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/cookie.xsl"/>
        </builtin-logicsheet>

        <!-- The Log logicsheet: access the cocoon logs from an xsp page  -->
        <builtin-logicsheet>
          <parameter name="prefix" value="log"/>
          <parameter name="uri" value="http://apache.org/xsp/log/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/log.xsl"/>
        </builtin-logicsheet>

        <!-- The Utility logicsheet -->
        <builtin-logicsheet>
          <parameter name="prefix" value="util"/>
          <parameter name="uri" value="http://apache.org/xsp/util/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/util.xsl"/>
        </builtin-logicsheet>

        <!-- The xsp-formval taglib serves as interface to retrieve
             validation results from a request attribute -->
        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-formval"/>
          <parameter name="uri" value="http://apache.org/xsp/form-validator/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/form-validator.xsl"/>
        </builtin-logicsheet>

        <!-- The sel taglib allows to put multiple pages / view into
             one xsp. While in general it is good style to put
             different views into different xsp because they're more
             easily maintained, this is a useful feature with
             e.g. with long forms that are broken into parts -->
        <builtin-logicsheet>
          <parameter name="prefix" value="sel"/>
          <parameter name="uri" value="http://apache.org/xsp/sel/1.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/sel.xsl"/>
        </builtin-logicsheet>

        <!-- The Action logicsheet -->
        <builtin-logicsheet>
          <parameter name="prefix" value="action"/>
          <parameter name="uri" value="http://apache.org/cocoon/action/1.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/action.xsl"/>
        </builtin-logicsheet>

        <!-- The capture taglib is for capturing parts of the XSP-generated
             XML as XML fragments or DOM nodes -->
        <builtin-logicsheet>
          <parameter name="prefix" value="capture"/>
          <parameter name="uri" value="http://apache.org/cocoon/capture/1.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/capture.xsl"/>
        </builtin-logicsheet>

        <!-- The XScript logicsheet -->
        <builtin-logicsheet>
          <parameter name="prefix" value="xscript"/>
          <parameter name="uri" value="http://apache.org/xsp/xscript/1.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/xscript.xsl"/>
        </builtin-logicsheet>

        <!-- The SOAP logicsheet -->
        <builtin-logicsheet>
          <parameter name="prefix" value="soap"/>
          <parameter name="uri" value="http://apache.org/xsp/soap/3.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/soap.xsl"/>
        </builtin-logicsheet>


<!--..... End configuration from 'xsp-session-fw' -->
    </target-language>
  </xsp-language>
</markup-languages>
<!--..... End configuration from 'xsp-markup' -->

<!--..... Start configuration from 'xsp-program-generator' -->

  <!--+
      | Program Generator
      |
      | The ProgamGenerator builds programs from a XML document written in a
      | MarkupLanguage.
      |
      |    auto-reload: whether the system should check if the source was
      |                 modified and reload of consequence.
      |    root-package: the java package to use for the generated classes
      |    preload: whether the system should preload the necessary components
      +-->
  <program-generator logger="core.program-generator">
    <parameter name="auto-reload" value="true"/>
    <parameter name="root-package" value="org.apache.cocoon.www"/>
    <parameter name="preload" value="true"/>
  </program-generator>
<!--..... End configuration from 'xsp-program-generator' -->
<!--..... Start configuration from 'xsp-program-language' -->

  <!--+
      | Programming Languages for the XSP pages
      +-->
  <programming-languages>
    <java-language logger="core.language.java" name="java">

      <!--+ Specifies which formatter to use to format source code.
          | This parameter is optional.
          | At the moment there is no implementation of a code formatter available.
          +-->
      <!--parameter name="code-formatter" value="org.apache.cocoon.components.language.programming.java.NullFormatter"/-->

      <!-- A singleton-like implementation of a ClassLoader -->
      <parameter name="class-loader" value="org.apache.cocoon.components.classloader.ClassLoaderManagerImpl"/>

      <!--+
          | Specifies which Java compiler to use. Possible variants are:
          |
          |  - EclipseJavaCompiler: the Eclipse JTD java compiler
          |  - Javac: the java compiler that comes with JDK
          |  - Jikes: the Jikes java compiler
          |  - Pizza: the Pizza java compiler
          |
          | NOTE: the Eclipse JTD is the only java compiler that is capable
          |       of imports classes thru the context classloader. All other
          |       compilers import classes from the JVM classpath and might
          |       normally result in ClassNotFound problems at compilation
          |       time. It is *HIGHLY* suggested that you use this compiler
          |       or you might experience problems in some servlet containers.
          +-->
      <!--parameter name="compiler" value="org.apache.cocoon.components.language.programming.java.EclipseJavaCompiler"/-->
      <!--parameter name="compiler" value="org.apache.cocoon.components.language.programming.java.Javac"/-->
      <!--parameter name="compiler" value="org.apache.cocoon.components.language.programming.java.Jikes"/-->
      <parameter name="compiler" value="org.apache.cocoon.components.language.programming.java.Pizza"/>

    </java-language>

    <!-- Interpreted JavaScript language -->
    <js-language logger="core.language.js" name="js"/>

</programming-languages>
<!--..... End configuration from 'xsp-program-language' -->
<!--..... Start configuration from 'xsp-xscript' -->

  <!-- Xscript -->
  <xscript logger="core.xscript">
    <parameter name="xscript:copy-of" value="resource://org/apache/cocoon/components/xscript/xslt/copy-of.xsl"/>
    <parameter name="xscript:value-of" value="resource://org/apache/cocoon/components/xscript/xslt/value-of.xsl"/>
  </xscript>
<!--..... End configuration from 'xsp-xscript' -->


<!--..... Start configuration from 'session' -->

  <session-manager logger="core.session-manager"/>
  <session-form-manager logger="core.session-manager"/>
  <session-transaction-manager logger="core.session-manager"/>
  <session-context-manager logger="core.session-manager"/>

  <session-media-manager logger="core.media-manager" pool-grow="4" pool-max="32" pool-min="8">
      <mediatypes default="html">
        <media name="wap" useragent="Nokia"/>
        <media name="wap" useragent="UP"/>
        <media name="wap" useragent="Wapalizer"/>
      </mediatypes>
  </session-media-manager>

  <session-context-providers>
      <component-instance class="org.apache.cocoon.webapps.session.context.StandardSessionContextProvider" name="request"/>
      <component-instance class="org.apache.cocoon.webapps.session.context.StandardSessionContextProvider" name="temporary"/>
  <!--..... Start configuration from 'provider' -->

    <component-instance class="org.apache.cocoon.webapps.authentication.context.AuthenticationContextProvider" name="authentication"/>
<!--..... End configuration from 'provider' -->
<!--..... Start configuration from 'provider' -->

    <component-instance class="org.apache.cocoon.webapps.portal.context.SessionContextProviderImpl" name="portal"/>
<!--..... End configuration from 'provider' -->
</session-context-providers>
<!--..... End configuration from 'session' -->
<!--..... Start configuration from 'authentication' -->


    <!--+
        + The authentication manager
        +-->
    <authentication-manager logger="core.authentication-manager">
    </authentication-manager>
    
<!--..... End configuration from 'authentication' -->
<!--..... Start configuration from 'portal' -->


  <portal-manager logger="core.portal-manager" pool-grow="4" pool-max="32" pool-min="8"/>

<!--..... End configuration from 'portal' -->
<!--..... Start configuration from 'datasources' -->

  <datasources>
    <jdbc logger="core.datasources.personnel" name="personnel">
      <!--
          If you have an Oracle database, and are using the the
      pool-controller below, you should add the attribute
      "oradb" and set it to true.

      <pool-controller min="5" max="10" oradb="true"/>

      That way the test to see if the server has disconnected
      the JdbcConnection will function properly.
      -->
      <pool-controller max="10" min="5"/>
      <!--
          If you need to ensure an autocommit is set to true or
      false, then create the "auto-commit" element below.

      <auto-commit>false</auto-commit>

      The default is true.
      -->
      <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
      <user>sa</user>
      <password/>
    </jdbc>
  </datasources>
<!--..... End configuration from 'datasources' -->
<!--..... Start configuration from 'db-modules' -->

   <!-- =============== Database Modules ==================== -->
   
<!--..... Start configuration from 'jsp' -->

   
  <!-- JSP Engine:
    The JSPGenerator and JSPReader select a JSPEngine component. The JSPEngine component
    launches a JSP servlet engine of your servlet container, feeds the
    HttpRequest into the JSP servlet engine, and pipes the jsp response as
    SAX events into Cocoon2. The JSP page is specified by the HttpRequest.
    This way you can continue to use your JSP pages. Your migration from JSP
    to XSP may be done step by step. You may specify your JSP pages either as
    JSP scriptlets or as JSP-XML. But keep in mind that your JSP output should
    be valid XML.
  -->
  <jsp-engine logger="core.jsp-engine">
    <parameter name="servlet-class" value="org.apache.jasper.servlet.JspServlet"/>
  </jsp-engine>
  
  <!--
    Alternative implementation that uses a RequestDispatcher for running named Servlets.
  -->
  <!--
  <jsp-engine logger="core.jsp-engine" class="org.apache.cocoon.components.jsp.JSPEngineImplNamedDispatcherInclude">
    <parameter name="servlet-name" value="*.jsp"/>
    <parameter name="forward" value="false"/>
  </jsp-engine>
  -->
  
<!--..... End configuration from 'jsp' -->
<!--..... Start configuration from 'lucene' -->


  <!-- Search:
    These are the components that handle the search. 
    
    Cocoon indexer write into an index.
    Cocoon searcher reads form an index, returning matched hits.
    Cocoon crawler crawls all links starting from a given base URI.
    Lucene xml indexer build a lucene document from XML content.
   -->
  <cocoon-indexer logger="core.search.indexer"/>
  <cocoon-searcher logger="core.search.searcher"/>  
  <cocoon-crawler logger="core.search.crawler"/>
  <lucene-xml-indexer logger="core.search.lucene"/>
<!--..... End configuration from 'lucene' -->
<!--..... Start configuration from 'profiler' -->


  <!--+ 
      | Profiler:
      | The profiler facilitates the gathering of statistics about timings of
      | different steps of pipelines.
      +-->
  <profiler results="10"/>
<!--..... End configuration from 'profiler' -->

</cocoon>
