You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2002/05/30 18:20:11 UTC

cvs commit: jakarta-avalon/src/documentation/old cocoon.xconf sitemap.xmap

nicolaken    02/05/30 09:20:11

  Added:       src/documentation/old cocoon.xconf sitemap.xmap
  Log:
  Updating docs generation to Cocoon 2.0.3 used in Centipede;
  cleaning the structure related to documentation.
  
  Revision  Changes    Path
  1.1                  jakarta-avalon/src/documentation/old/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  <?xml version="1.0"?>
  <cocoon version="2.0">
  
  <!-- ===================== General Components =========================== -->
  
    <!-- The default parser used in the Apache Cocoon 2 system is
         org.apache.cocoon.components.parser.JaxpParser.
         Apache Cocoon 2 system requires a JAXP 1.1 parser.
         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
         move the line below starting with <parser ...> out of this comment block.
         You also than have to add a system property to your JVM
         (probably on the startup of your servlet engine like this:
  
         -Dorg.apache.cocoon.components.parser.Parser=org.apache.cocoon.components.parser.XercesParser
  
    <parser class="org.apache.cocoon.components.parser.XercesParser"/>
    -->
  
    <!-- Storing:
         freememory: Indicates how much memory should be left free in the
                     JVM for normal operation.
         heapsize: Indicates how big the heap size can grow to before the
                   cleanup thread kicks in.
         objectlifetime: Indicates how long (seconds) a cache object will
                         be hold in memory. The object will be thrown out,
                         when the time is over.
         interval: Indicates the interval of the cleanup thread in seconds.
         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.
         usethread: Indicates whether we use a cleanup thread or not.
         threadpriority: Indicates the priority of the cleanup thread.
                         (1 is the lowest priority and 10 is the highest).
    -->
    <store class="org.apache.cocoon.components.store.MRUMemoryStore">
       <parameter name="maxobjects" value="100"/>
       <parameter name="threadpriority" value="5"/>
       <parameter name="filesystem" value="true"/>
    </store>
  
    <!-- Store Janitor:
      freememory = How much free memory shall be available in the jvm
      heapsize = Indicates the limit of the jvm memory consumption
      cleanupthreadinterval = How often shall the cleanup thread check memory
      threadpriority = Indicates the thread priority of the cleanup thread
  
      Be carefull with the heapsize and freememory paramters. Wrong values can
      cause high cpu usage.
      Example configuration:
      Jvm settings: 
        -Xms100000000 -Xmx200000000
      store-janitor settings:
         <parameter name="freememory" value="50000000"/>
         <parameter name="heapsize" value="150000000"/>
    
      Heapsize must be higher then the -Xms parameter and freememory
      between those both.    
    -->
    <store-janitor class="org.apache.cocoon.components.store.StoreJanitorImpl" logger="root.store">
       <parameter name="freememory" value="1000000"/>
       <parameter name="heapsize" value="60000000"/>
       <parameter name="cleanupthreadinterval" value="10"/>
       <parameter name="threadpriority" value="5"/>
    </store-janitor>
  
   <xslt-processor class="org.apache.cocoon.components.xslt.XSLTProcessorImpl" logger="root.xslt">
       <parameter name="use-store" value="true"/>
    </xslt-processor>
  
    <!-- The url factory adds special url protocols to the system, they
         are then available inside Cocoon, e.g. as a source argument
         for one of the sitemap components -->
    <url-factory>
      <protocol name="resource" class="org.apache.cocoon.components.url.ResourceURLFactory"/>
      <protocol name="context"  class="org.apache.cocoon.components.url.ContextURLFactory"/>
    </url-factory>
  
    <!-- The source handler adds special url protocols to the system, they
         are then available inside Cocoon, e.g. as a source argument
         for one of the sitemap components. -->
    <source-handler>
    </source-handler>
  
    <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>
      <java-language name="java">
        <!-- compiler parameter specifies which class to use to compile Java.
             Possible variants are Javac and Jikes compilers.
             Javac requires javac.jar (included with Cocoon distribution).
             Jikes requires IBM jikes compiler to be present in the PATH  -->
        <parameter name="compiler" value="org.apache.cocoon.components.language.programming.java.Javac"/>
        <!-- Specifies which formatter to use to format source code.
             This parameter is optional. -->
         <!-- A singleton-like implementation of a ClassLoader -->
        <parameter name="class-loader" value="org.apache.cocoon.components.classloader.ClassLoaderManagerImpl"/>
      </java-language>
    </programming-languages>
  
    <classloader class="org.apache.cocoon.components.classloader.ClassLoaderManagerImpl"/>
  
    <markup-languages>
      <xsp-language name="xsp">
        <parameter name="prefix" value="xsp"/>
        <parameter name="uri" value="http://apache.org/xsp"/>
  
        <!-- Defines the XSP Core logicsheet for the Java language -->
        <target-language name="java">
          <parameter name="core-logicsheet" value="resource://org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl"/>
          
          <!-- The Request logicsheet (taglib) is an XSP logicsheet that wraps XML tags 
               around standard request operations -->
          <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 (taglib) is an XSP logicsheet that wraps XML tags 
               around standard response operations -->
          <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 (taglib) is an XSP logicsheet that wraps XML tags around 
               standard session operations. Specifically, the Session logicsheet provides an 
               XML interface to most methods of the HttpSession object (see the Java Servlet API 
               Specification, version 2.2 ) for more information. -->
          <builtin-logicsheet>
            <parameter name="prefix" value="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>
  
          <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 ESQL logicsheet is an XSP logicsheet that performs sql queries and 
               serializes their results as XML. This allows you to work with data from a 
               wide variety of different sources when using Apache Cocoon. -->
          <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>
  
          <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>
  
          <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 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>
  
        </target-language>
      </xsp-language>
  
      <!-- Defines Sitemap Core logicsheet for the Java language -->
      <sitemap-language name="sitemap">
        <parameter name="prefix" value="map"/>
        <parameter name="uri" value="http://apache.org/cocoon/sitemap/1.0"/>
  
        <target-language name="java">
          <parameter name="core-logicsheet" value="resource://org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl"/>
        </target-language>
      </sitemap-language>
    </markup-languages>
  
    <!-- A StreamPipeline either
         collects a Reader and let it produce a character stream
         or connects a EventPipeline with a
         Serializer and let them produce the character stream.
    -->
    <stream-pipeline class="org.apache.cocoon.components.pipeline.CachingStreamPipeline"
                     pool-max="32" pool-min="16" pool-grow="4"/>
  
    <!-- Caching of stream pipeline:
         freememory: Indicates how much memory should be left free in the
                     JVM for normal operation.
         heapsize: Indicates how big the heap size can grow to before the
                   cleanup thread kicks in.
         objectlifetime: Indicates how long (seconds) a cache object will
                         be hold in memory. The object will be thrown out,
                         when the time is over.
         interval: Indicates the interval of the cleanup thread in seconds.
         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.
         usethread: Indicates whether we use a cleanup thread or not.
         threadpriority: Indicates the priority of the cleanup thread.
                         (1 is the lowest priority and 10 is the highest).
    -->
    <stream-cache class="org.apache.cocoon.components.store.MRUMemoryStore" logger="root.store">
       <parameter name="maxobjects" value="100"/>
       <parameter name="threadpriority" value="5"/>
       <parameter name="filesystem" value="true"/>
    </stream-cache>
  
    <!-- An EventPipeline connects the generator and the various transformers
         and produces a character stream. Alternatives to CachingEventPipeline
         are: NonCachingEventPipeline.
    <event-pipeline class="org.apache.cocoon.components.pipeline.NonCachingEventPipeline"/>
    -->
   <event-pipeline class="org.apache.cocoon.components.pipeline.CachingEventPipeline"
                    pool-max="32" pool-min="16" pool-grow="4"/>
  
    <!-- Caching of event pipeline:
         freememory: Indicates how much memory should be left free in the
                     JVM for normal operation.
         heapsize: Indicates how big the heap size can grow to before the
                   cleanup thread kicks in.
         objectlifetime: Indicates how long (seconds) a cache object will
                         be hold in memory. The object will be thrown out,
                         when the time is over.
         interval: Indicates the interval of the cleanup thread in seconds.
         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.
         usethread: Indicates whether we use a cleanup thread or not.
         threadpriority: Indicates the priority of the cleanup thread.
                         (1 is the lowest priority and 10 is the highest).
    -->
    <event-cache class="org.apache.cocoon.components.store.MRUMemoryStore" logger="root.store">
       <parameter name="maxobjects" value="100"/>
       <parameter name="threadpriority" value="5"/>
       <parameter name="filesystem" value="true"/>
    </event-cache>
  
    <!-- The SAXConnector connects the various pipeline components.
         LoggingSAXConnector logs SAX events between pipeline components
         into a cocoon's log file.
         Uncomment one of the following lines for using the SAXConnector.
    <sax-connector class="org.apache.cocoon.components.saxconnector.LoggingSAXConnector"/>
    -->
  
  <!-- ======================== The sitemap  ============================== -->
  
    <!-- The reloading of the sitemap:
          The check-reload attribute determines if the sitemap is reloaded on change. If
          it is set to "no", the sitemap is generated once at startup, if it is set to "yes",
          the sitemap is regenerated if it changes.
          The reload-method specifies the method for the regeneration:
          asynchron: If the sitemap changes, the sitemap is regenerated at the next request in
                           the background and the incoming request is served with the old sitemap.
                           All subsequent requests are served with the old sitemap until the
                           regeneration in the background has finished.
          synchron: If the sitemap changes, the sitemap is regenerated at the next request.
                         When the regeneration is finished the request (and all subsequent ones)
                         is served with the new sitemap.
  
          For development environment set the reload-method to synchron and the
          check-reload to yes, for production environment it is advisable to set
          the reload-method to asynchron and for more safety the check-reload to no.
       -->
    <sitemap file="sitemap.xmap" reload-method="asynchron" check-reload="yes"/>
  
  </cocoon>
  
  
  
  1.1                  jakarta-avalon/src/documentation/old/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  
  <!-- =========================== Components ================================ -->
  
   <map:components>
  
    <map:generators default="file">
     <map:generator  name="file"        src="org.apache.cocoon.generation.FileGenerator" label="content"/>
    </map:generators>
  
    <map:transformers default="xslt">
     <map:transformer     name="xslt"      src="org.apache.cocoon.transformation.TraxTransformer">
      <use-request-parameters>false</use-request-parameters>
      <use-browser-capabilities-db>false</use-browser-capabilities-db>
     </map:transformer>
     <map:transformer     name="xinclude"  src="org.apache.cocoon.transformation.XIncludeTransformer"/>
    </map:transformers>
  
    <map:readers default="resource">
     <map:reader name="resource"       src="org.apache.cocoon.reading.ResourceReader"/>
    </map:readers>
  
    <map:serializers default="html">
     <map:serializer name="html"   mime-type="text/html"        src="org.apache.cocoon.serialization.HTMLSerializer">
       <encoding>iso8859-1</encoding>
     </map:serializer>
     <map:serializer name="xml"    mime-type="text/xml"         src="org.apache.cocoon.serialization.XMLSerializer"/>
     <map:serializer name="links"                               src="org.apache.cocoon.serialization.LinkSerializer"/>
     <map:serializer name="fo2pdf" mime-type="application/pdf"  src="org.apache.cocoon.serialization.FOPSerializer"/>
    </map:serializers>
  
    <map:matchers default="wildcard">
     <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
    </map:matchers>
   </map:components>
  
  <!-- =========================== Views =================================== -->
  
   <map:views>
    <map:view name="content" from-label="content">
     <map:serialize type="xml"/>
    </map:view>
  
    <map:view name="links" from-position="last">
     <map:transform src="stylesheets/filterlinks.xsl"/>
     <map:serialize type="links"/>
    </map:view>
  
   </map:views>
  
  <!-- =========================== Pipelines ================================= -->
  
   <map:pipelines>
    <map:pipeline>
     <map:match pattern="">
      <map:redirect-to uri="index.html"/>
     </map:match>
  
     <map:match pattern="**book.xml">
       <map:generate src="xdocs/{1}book.xml"/>
       <map:transform src="stylesheets/book2menu.xsl"/>
       <map:serialize type="xml"/>
     </map:match>
  
     <map:match pattern="body-**.xml">
       <map:generate src="xdocs/{1}.xml"/>
       <map:transform src="stylesheets/document2docbook.xsl"/>
       <map:transform src="stylesheets/docbook2body.xsl"/>
       <map:serialize type="xml"/>
     </map:match>
  
     <map:match pattern="*.html">
      <map:aggregate element="site">
       <map:part src="cocoon:/book.xml"/>
       <map:part src="cocoon:/body-{1}.xml"/>
      </map:aggregate>
      <map:transform src="stylesheets/site2xhtml.xsl"/>
      <map:serialize/>
     </map:match>
  
     <map:match pattern="**developing-with-avalon.pdf">
       <map:generate src="xdocs/developing/index.xml"/>
       <map:transform type="xinclude"/>
       <map:transform src="stylesheets/docbook2fo.xsl"/>
       <map:serialize type="fo2pdf"/>
     </map:match>
  
     <map:match pattern="**diagrams/*.html">
       <map:read src="diagrams/{2}.html" mime-type="text/html"/>
     </map:match>
  
     <map:match pattern="api/**.html">
       <!-- dummy: can't "ignore" certain uris -->
       <map:read src="xdocs/index.xml" mime-type="text/xml"/>
     </map:match>
  
     <map:match pattern="developing/*.html">
      <map:aggregate element="site">
       <map:part src="cocoon:/developing/book.xml"/>
       <map:part src="cocoon:/body-developing/{1}.xml"/>
      </map:aggregate>
      <map:transform src="stylesheets/site2xhtml.xsl"/>
      <map:serialize/>
     </map:match>
  
     <map:match pattern="**/*.html">
      <map:aggregate element="site">
       <map:part src="cocoon:/{1}/book.xml"/>
       <map:part src="cocoon:/body-{1}/{2}.xml"/>
      </map:aggregate>
      <map:transform src="stylesheets/site2xhtml.xsl"/>
      <map:serialize/>
     </map:match>
  
     <!-- ================  Static  =========================== -->
  
     <map:match pattern="**images/*.png">
      <map:read src="resources/images/{2}.png" mime-type="image/png"/>
     </map:match>
  
     <map:match pattern="**images/*.jpg">
      <map:read src="resources/images/{2}.jpg" mime-type="image/jpeg"/>
     </map:match>
  
     <map:match pattern="**images/*.gif">
      <map:read src="resources/images/{2}.gif" mime-type="image/gif"/>
     </map:match>
  
     <map:handle-errors>
      <map:transform src="stylesheets/system/error2html.xsl"/>
      <map:serialize status-code="500"/>
     </map:handle-errors>
  
    </map:pipeline>
   </map:pipelines>
  
  </map:sitemap>
  
  <!-- end of file -->
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>