<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You 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">

<!-- For full description of the components and their parameters, see ...
     - Apache Cocoon User Documentation at /userdocs/
     - webapp/WEB-INF/cocoon.xconf - describes each core component in detail
     - each optional component/.../*.xconf - these describe the parameters
     for each component and are automatically included at build-time.

     This configuration is tuned for the documentation webapp, and is terse.
-->

<!-- ===================== General Components =========================== -->

  <!-- Parser:  -->
  <xml-parser logger="core.xml-parser">
    <parameter name="validate" value="false"/>
  </xml-parser>

  <!-- ============================ STORE ============================ -->
  <persistent-store logger="core.store.persistent">
    <parameter name="use-cache-directory" value="true"/>
    <parameter name="order" value="1701"/>
  </persistent-store>

  <!-- Memory Storing -->
  <transient-store logger="core.store.transient">
     <parameter name="maxobjects" value="5000"/>
     <parameter name="use-persistent-cache" value="false"/>
  </transient-store>

  <!-- Store Janitor -->
  <store-janitor logger="core.store.janitor">
     <parameter name="freememory" value="1024768"/>
     <parameter name="heapsize" value="67108864"/>
     <parameter name="cleanupthreadinterval" value="5"/>
     <parameter name="threadpriority" value="5"/>
     <parameter name="percent_to_free" value="15"/>
  </store-janitor>
  <!-- ============================ STORE END ========================= -->

  <!-- XSLT Processor -->
  <xslt-processor logger="core.xslt-processor">
     <parameter name="use-store" value="true"/> 
  </xslt-processor>

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

  <!-- Source Factories -->
  <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"/>
    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>
  </source-factories>

  <!-- The XMLizer converts different mime-types to XML -->
  <xmlizer>
    <parser mime-type="text/html" role="org.apache.excalibur.xml.sax.SAXParser/HTML"/>
    <parser mime-type="text/xml" role="org.apache.excalibur.xml.sax.SAXParser"/>
  </xmlizer>

  <!-- Program Generator -->
  <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>

  <!-- Programming Languages -->
  <programming-languages>
    <java-language logger="core.language.java" name="java">
      <parameter name="class-loader" value="org.apache.cocoon.components.classloader.ClassLoaderManagerImpl"/>
      <parameter name="compiler" value="org.apache.cocoon.components.language.programming.java.Pizza"/>
    </java-language>
  </programming-languages>

  <!-- Class loader -->
  <classloader class="org.apache.cocoon.components.classloader.ClassLoaderManagerImpl" logger="core.classloader"/>

  <!-- Entity resolution catalogs -->
  <entity-resolver logger="core.resolver">
    <parameter name="catalog" value="WEB-INF/entities/catalog"/>
    <parameter name="verbosity" value="1"/>
  </entity-resolver>


<!-- ======================== The sitemap  ============================== -->

  <sitemap file="sitemap.xmap" check-reload="yes" logger="sitemap"/>
             
</cocoon>
