You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2005/03/24 07:53:04 UTC

svn commit: r158888 - in forrest/trunk/docs-author: ./ content/xdocs/ content/xdocs/howto/

Author: crossley
Date: Wed Mar 23 22:53:03 2005
New Revision: 158888

URL: http://svn.apache.org/viewcvs?view=rev&rev=158888
Log:
Added two howto documents:
"How to understand html processing and sitemap pipelines" and
"How to customize processing of html source".
Contributed by: Ferdinand Soethe
Issue: FOR-446

Added:
    forrest/trunk/docs-author/content/xdocs/howto/forrest.xmap.html   (with props)
    forrest/trunk/docs-author/content/xdocs/howto/howto-custom-html-source.xml   (with props)
    forrest/trunk/docs-author/content/xdocs/howto/howto-understand-pipelines.xml   (with props)
    forrest/trunk/docs-author/content/xdocs/howto/project_sitemap.xmap.html   (with props)
    forrest/trunk/docs-author/content/xdocs/howto/sitemap.xmap.html   (with props)
Modified:
    forrest/trunk/docs-author/content/xdocs/howto/index.xml
    forrest/trunk/docs-author/content/xdocs/site.xml
    forrest/trunk/docs-author/status.xml

Added: forrest/trunk/docs-author/content/xdocs/howto/forrest.xmap.html
URL: http://svn.apache.org/viewcvs/forrest/trunk/docs-author/content/xdocs/howto/forrest.xmap.html?view=auto&rev=158888
==============================================================================
--- forrest/trunk/docs-author/content/xdocs/howto/forrest.xmap.html (added)
+++ forrest/trunk/docs-author/content/xdocs/howto/forrest.xmap.html Wed Mar 23 22:53:03 2005
@@ -0,0 +1,336 @@
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  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.
+-->
+<html>
+<head>
+<title>Annotated forrest.xmap</title>
+</head>
+<body>
+<h1>sitemap.xmap</h1>
+<pre><![CDATA[
+<?xml version="1.0"?>
+<!-- ===============================================
+Pipelines defining all Source XML types Forrest can handle.
+Converts from arbitrary formats to standard Forrest doc-v12 XML.
+
+First, determines if a simple format file exists.
+Candidates are: .html .ihtml .txt .sxw .jspwiki 
+
+Otherwise, the default *.xml handling is used.  The XML's DTD type is
+discovered using the SourceTypeAction, and an appropriate transformation
+applied.  Thus to add new XML types, just define a new <sourcetype>
+and an appropriate <map:when> handler.
+
+Generates  :  Source XML, Body HTML for *.ehtml
+Example URL:  http://localhost:8888/index.xml
+Used by    :  *.html and *.pdf pipelines in sitemap.xmap
+Uses       :  content/xdocs/**.xml
+
+$Revision: 1.8 $
+==================================================== -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  <map:components>
+    <map:generators default="file">
+      <map:generator name="html"      src="org.apache.cocoon.generation.HTMLGenerator">
+        <jtidy-config>WEB-INF/jtidy.properties</jtidy-config>
+      </map:generator>
+      <map:generator name="text2xml" logger="sitemap.generator.textgenerator"
+                     src="org.apache.cocoon.generation.TextGenerator">
+       <parameter name="localizable" value="true"/>
+      </map:generator>
+      <map:generator name="exception"
+                  src="org.apache.cocoon.generation.ParseExceptionGenerator"/>
+                  
+    </map:generators>
+    <map:serializers default="html"/>
+    <map:matchers default="wildcard"/>
+
+    <map:transformers default="xslt">
+     <map:transformer name="pattern"
+                      src="org.apache.cocoon.transformation.PatternTransformer" 
+                      logger="sitemap.transformer.pattern">
+      <parameter name="groups" value="true"/>
+     </map:transformer>
+     <map:transformer name="lexer"
+                      src="org.apache.cocoon.transformation.LexicalTransformer" 
+                      logger="sitemap.transformer.lexer">
+      <parameter name="localizable" value="true"/>
+     </map:transformer>
+     <map:transformer name="parser"
+                      src="org.apache.cocoon.transformation.ParserTransformer" 
+                      logger="sitemap.transformer.parser">
+      <parameter name="flatten" value="true"/>
+      <parameter name="recovery" value="true"/>
+      <parameter name="localizable" value="true"/>
+     </map:transformer>
+  
+     <map:transformer name="extparser"
+                      src="org.apache.cocoon.transformation.ExtendedParserTransformer"
+                      logger="sitemap.transformer.extendedparser">
+     </map:transformer>
+    </map:transformers>
+
+    <map:actions>
+      <map:action logger="sitemap.action.sourcetype" name="sourcetype" src="org.apache.forrest.sourcetype.SourceTypeAction">
+        <sourcetype name="document-v10">
+          <document-declaration public-id="-//APACHE//DTD Documentation V1.0//EN" />
+        </sourcetype>
+        <sourcetype name="howto-v10">
+          <document-declaration public-id="-//APACHE//DTD How-to V1.0//EN" />
+        </sourcetype>
+        <sourcetype name="todo-v10">
+          <document-declaration public-id="-//APACHE//DTD Todo V1.0//EN" />
+        </sourcetype>
+        <sourcetype name="changes-v10">
+          <document-declaration public-id="-//APACHE//DTD Changes V1.0//EN" />
+        </sourcetype>
+        <sourcetype name="document-v11">
+          <document-declaration public-id="-//APACHE//DTD Documentation V1.1//EN" />
+        </sourcetype>
+        <sourcetype name="howto-v11">
+          <document-declaration public-id="-//APACHE//DTD How-to V1.1//EN" />
+        </sourcetype>
+        <sourcetype name="todo-v11">
+          <document-declaration public-id="-//APACHE//DTD Todo V1.1//EN" />
+        </sourcetype>
+        <sourcetype name="changes-v11">
+          <document-declaration public-id="-//APACHE//DTD Changes V1.1//EN" />
+        </sourcetype>
+        <sourcetype name="todo-v12">
+          <document-declaration public-id="-//APACHE//DTD Todo V1.2//EN" />
+        </sourcetype>
+        <sourcetype name="changes-v12">
+          <document-declaration public-id="-//APACHE//DTD Changes V1.2//EN" />
+        </sourcetype>
+        <sourcetype name="howto-v12">
+          <document-declaration public-id="-//APACHE//DTD How-to V1.2//EN" />
+        </sourcetype>
+        <sourcetype name="todo-v13">
+          <document-declaration public-id="-//APACHE//DTD Todo V1.3//EN" />
+        </sourcetype>
+        <sourcetype name="changes-v13">
+          <document-declaration public-id="-//APACHE//DTD Changes V1.3//EN" />
+        </sourcetype>
+        <sourcetype name="howto-v13">
+          <document-declaration public-id="-//APACHE//DTD How-to V1.3//EN" />
+        </sourcetype>
+        <sourcetype name="document-v20a">
+          <document-declaration public-id="-//APACHE//DTD Documentation V2.0a//EN" />
+        </sourcetype>
+        <sourcetype name="document-v20">
+          <document-declaration public-id="-//APACHE//DTD Documentation V2.0//EN" />
+        </sourcetype>
+        <sourcetype name="todo-v20">
+          <document-declaration public-id="-//APACHE//DTD Todo V2.0//EN" />
+        </sourcetype>
+        <sourcetype name="changes-v20">
+          <document-declaration public-id="-//APACHE//DTD Changes V2.0//EN" />
+        </sourcetype>
+        <sourcetype name="howto-v20">
+          <document-declaration public-id="-//APACHE//DTD How-to V2.0//EN" />
+        </sourcetype>
+      </map:action>
+      <map:action logger="sitemap.action.locale" name="locale" src="org.apache.cocoon.acting.LocaleAction">
+      </map:action>
+    </map:actions>
+    <map:selectors default="parameter">
+    <map:selector logger="sitemap.selector.parameter" name="parameter" src="org.apache.cocoon.selection.ParameterSelector" />
+   <map:selector logger="sitemap.selector.exception" name="exception"
+                 src="org.apache.cocoon.selection.ExceptionSelector">
+     <exception name="syntax" class="net.sourceforge.chaperon.process.ParseException"/>
+     <exception class="java.lang.Throwable" unroll="true"/>
+   </map:selector>
+      <map:selector logger="sitemap.selector.config" name="config" src="org.apache.cocoon.selection.SimpleSelector" />
+    </map:selectors>
+  </map:components>
+
+  <map:resources>
+    <map:resource name="transform-to-document">
+      <map:act type="sourcetype" src="{src}">
+        <map:select type="parameter">
+          <map:parameter name="parameter-selector-test" value="{sourcetype}" />
+
+          <map:when test="document-v10">
+          <!-- FIXME (JJP):  This should use the v12 now-->
+            <map:transform src="{forrest:stylesheets}/docv10todocv11.xsl" />
+          </map:when>
+
+          <map:when test="document-v20a">
+            <map:transform src="{forrest:stylesheets}/docv20todocv12.xsl" />
+          </map:when>
+
+          <map:when test="document-v20">
+            <map:transform src="{forrest:stylesheets}/docv20todocv13.xsl" />
+          </map:when>
+
+          <map:when test="howto-v10">
+            <map:transform src="{forrest:stylesheets}/howto2document.xsl" />
+          </map:when>
+
+          <map:when test="howto-v11">
+            <map:transform src="{forrest:stylesheets}/howto2document.xsl" />
+          </map:when>
+          <map:when test="howto-v12">
+            <map:transform src="{forrest:stylesheets}/howto2document.xsl" />
+          </map:when>
+          <map:when test="howto-v13">
+            <map:transform src="{forrest:stylesheets}/howto2document.xsl" />
+          </map:when>
+          <map:when test="howto-v20">
+            <map:transform src="{forrest:stylesheets}/howto2document.xsl" />
+          </map:when>
+
+          <map:when test="todo-v10">
+            <map:transform src="{forrest:stylesheets}/todo2document.xsl" />
+          </map:when>
+
+          <map:when test="todo-v11">
+            <map:transform src="{forrest:stylesheets}/todo2document.xsl" />
+          </map:when>
+
+          <map:when test="todo-v12">
+            <map:transform src="{forrest:stylesheets}/todo2document.xsl" />
+          </map:when>
+
+          <map:when test="todo-v13">
+            <map:transform src="{forrest:stylesheets}/todo2document.xsl" />
+          </map:when>
+
+          <map:when test="todo-v20">
+            <map:transform src="{forrest:stylesheets}/todo2document.xsl" />
+          </map:when>
+
+          <map:when test="changes-v10">
+            <map:transform src="{forrest:stylesheets}/changesv10tochangesv11.xsl" />
+            <map:transform src="{forrest:stylesheets}/changes2document.xsl" />
+          </map:when>
+
+          <map:when test="changes-v11">
+            <map:transform src="{forrest:stylesheets}/changes2document.xsl" />
+          </map:when>
+
+          <map:when test="changes-v12">
+            <map:transform src="{forrest:stylesheets}/changes2document.xsl" />
+          </map:when>
+
+          <map:when test="changes-v13">
+            <map:transform src="{forrest:stylesheets}/changes2document.xsl" />
+          </map:when>
+
+          <map:when test="changes-v20">
+            <map:transform src="{forrest:stylesheets}/changes2document.xsl" />
+          </map:when>
+          <map:otherwise />
+        </map:select>
+      </map:act>
+    </map:resource>
+]]></pre>
+
+    <h2>Definition of File-Resolver-Resource</h2>
+<pre><![CDATA[
+    <map:resource name="file-resolver">
+      <map:select type="exists">
+        <map:when test="{project:content.xdocs}{uri}.ihtml">
+          <map:generate src="{project:content.xdocs}{uri}.ihtml" type="html" />
+          <map:transform src="{forrest:stylesheets}/html2document.xsl" />
+          <map:transform type="idgen" />
+          <map:serialize type="xml-document"/>
+        </map:when>
+        <map:when test="{project:content.xdocs}{uri}.html">
+          <map:generate src="{project:content.xdocs}{uri}.html" type="html" />
+          <map:transform src="{forrest:stylesheets}/html2document.xsl" />
+          <map:transform type="idgen" />
+          <map:serialize type="xml-document"/>
+        </map:when>
+        <map:when test="{project:content.xdocs}{uri}.txt">
+          <map:match type="regexp" pattern="^(.*?)([^/]*).xml$">
+            <map:generate type="text2xml" src="{project:content.xdocs}{1}{2}.txt" />
+            <map:transform src="{forrest:stylesheets}/text2document.xsl">
+              <map:parameter name="filename" value="{2}" />
+            </map:transform>
+            <map:serialize type="xml-document"/>
+          </map:match>
+        </map:when>
+        <map:otherwise>
+        
+          <map:select type="exists">
+             <map:when test="{project:temp-dir}/input.xmap">
+               <map:mount uri-prefix=""
+                          src="{project:temp-dir}/input.xmap" 
+                          check-reload="yes" 
+                          pass-through="true"/>
+            </map:when>
+          </map:select>
+        
+          <map:generate src="{project:content.xdocs}{uri}.xml" />
+          <map:call resource="transform-to-document">
+            <map:parameter name="src" value="{project:content.xdocs}{uri}.xml" />
+          </map:call>
+          <map:serialize type="xml-document"/>
+        </map:otherwise>
+      </map:select>
+    </map:resource>
+  </map:resources>
+
+  <map:pipelines>
+    <map:pipeline>
+
+      <!-- ============================================================ -->
+      <!-- INTERMEDIATE FORMATS                                         -->
+      <!-- ============================================================ -->
+
+      <map:match pattern="**body-*.html">
+        <map:select type="exists">
+          <map:when test="{project:content.xdocs}{1}{2}.ehtml">
+            <map:generate src="{project:content.xdocs}{1}{2}.ehtml" />
+            <map:transform src="{forrest:stylesheets}/html2htmlbody.xsl" />
+            <map:serialize type="xml" />
+          </map:when>
+        </map:select>
+      </map:match>
+
+      <!-- ============================================================ -->
+      <!-- SOURCE FORMATS                                               -->
+      <!-- ============================================================ -->
+]]></pre>
+
+      <h2>Second Match for '**.xml'</h2>
+<pre><![CDATA[
+      <map:match pattern="**.xml">
+        <map:select type="config">
+          <map:parameter name="value" value="{defaults:i18n}"/>
+          <map:when test="true">
+          <map:act type="locale">
+            <map:call resource="file-resolver">
+              <map:parameter name="uri" value="{../1}_{language}"/>
+            </map:call>
+          </map:act>
+          </map:when>
+          <map:otherwise>
+            <map:call resource="file-resolver">
+              <map:parameter name="uri" value="{1}"/>
+            </map:call>
+          </map:otherwise>
+        </map:select>
+      </map:match>
+      
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>
+]]></pre>
+</body>
+</html>

Propchange: forrest/trunk/docs-author/content/xdocs/howto/forrest.xmap.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/docs-author/content/xdocs/howto/howto-custom-html-source.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/docs-author/content/xdocs/howto/howto-custom-html-source.xml?view=auto&rev=158888
==============================================================================
--- forrest/trunk/docs-author/content/xdocs/howto/howto-custom-html-source.xml (added)
+++ forrest/trunk/docs-author/content/xdocs/howto/howto-custom-html-source.xml Wed Mar 23 22:53:03 2005
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  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 howto PUBLIC "-//APACHE//DTD How-to V2.0//EN" "http://forrest.apache.org/dtd/howto-v20.dtd">
+<howto>
+  <header>
+    <title>How to customize processing of html source</title>
+    <abstract>
+      Explains how to do additional processing of html source documents.
+    </abstract>
+    <last-modified-content-date date="2005-03-23" />
+  </header>
+
+  <audience title="Intended Audience">
+    <p>
+      Users who want to integrate HTML-pages that require custom
+      adjustments and everybody who wants to learn more about Forrest's
+      pipelines in general.
+    </p>
+  </audience>
+
+  <purpose title="Purpose">
+    <p>
+      Integrating legacy HTML-pages is a common task when migrating
+      existing websites to Forrest. This document explains how to implement
+      custom processing which is required when Forrest's standard pipeline
+      for html does not suffice.
+    </p>
+  </purpose>
+
+  <prerequisites title="Prerequisites">
+    <p>To follow these instructions you will need:</p>
+    <ol>
+      <li>
+        Read the <a href="site:howto/understand-pipelines">How to
+        understand html processing and sitemap pipelines</a>.
+      </li>
+      <li>
+        Know how to use a
+        <a href="site:project-sitemap">project sitemap</a>.
+      </li>
+      <li>
+        A basic understanding of coocons pipelines and their
+        components. You should know about matchers, generators,
+        transformers and serializers and have a rough idea how they work
+        together in a pipeline ( A good place to start learning about Cocoon is <a 
+        href="http://cocoon.apache.org/2.1/userdocs/concepts/">
+        Understanding Apache Cocoon</a>).
+      </li>
+      <li>
+        If you want to follow the examples right through your
+        Forrest, a current version of Forrest installed on your
+        system and read-access to Forrest's program directory is
+        necessary.
+      </li>
+      <li>
+        If you plan on creating your own custom processing for
+        html-pages, you'll also need write access to your
+        project directory.
+        <note>
+          We strongly recommend creating a backup of your
+          Forrest project directory before you proceed with your own adjustments!
+        </note>
+      </li>
+    </ol>
+  </prerequisites>
+
+  <steps title="Customizing the html-Pipeline">
+    <section id="when">
+        <title>When to customize?</title>
+        
+        <p>
+          The html-Pipeline in Forrest is designed to be able to also
+          integrate legacy html-Pages in a Forrest project. In doing so,
+          it will fix common markup errors and convert html to Forrest's
+          intermediate document format.
+        </p>
+        <p>
+          Due to the nature of html as presentational markup, there is no way
+          this automated process can identify elements in your pages that
+          are not required or even unwanted in the Forrest environment. 
+        </p>
+        <p>
+          A good example are pages from sites where the navigational elements
+          (menus, tabs etc.) are embedded in the html of each page.
+          Since Forrest can't know what is an unwanted menu and what belongs
+          to the page body that you want to keep, you will need to customize
+          the process to remove elements that are not needed. If you don't,
+          then you will see the original page from your legacy website,
+          menu and all, embedded in your new Forrest site.
+        </p>
+      </section>
+
+      <section id="how">
+        <title>How to customize?</title>
+        <p>
+          To add your own custom processing for a group of pages, you will
+          create a project sitemap with pipelines that process documents
+          according to your specifications.
+        </p>
+        <p>
+          This project sitemap is located in the file
+          'src\documentation\sitemap.xmap' in your Forrest project directory
+          and will be created automatically when you seed a new project.
+          At this point it contains only one
+          <a href="project_sitemap.xmap.html#Example+pipeline+for+%27**custom.xml%27">
+          pipeline for handling the '**custom.xml'-pattern</a> as an example.
+        </p>
+        <p>
+          To add your own custom processing, edit the file and add a new
+          pipeline to the project sitemap. Since the project sitemap is
+          loaded into the main sitemap
+          <a href="sitemap.xmap.html#Insertion+Point+for+Project+Sitemap">
+          right at the top</a>, your pipeline intercepts practically all
+          of Forrest's standard pipelines.
+        </p>
+      </section>
+
+      <section id="what">
+        <title>What to intercept?</title>
+        <p>
+          Where to intercept standard processing is really a matter of your
+          choice. A good rule is to replace as little standard handling
+          as possible so that future changes in the Forrest architecture are
+          less likely to break your application.
+        </p>
+        <p>
+          In our case all we need to do is add a transformation that
+          removes all the unwanted elements. The best place to do this
+          would be right after the generator has converted our document to
+          xhtml.
+        </p>
+        <p>
+          However, since we can only replace a complete pipeline,
+          we'll create a new pipeline that intercepts **.xml for our pages,
+          copy the steps the original processor is doing and add a
+          transformation of our own to it.
+        </p>
+      </section>
+      <section id="intercept">
+        <title>Intercept pattern</title>
+        <p>
+          Take great care when intercepting very basic pipelines.
+          Instead of designing our custom pipeline to match the
+          original **.xml pattern, try to narrow your matcher down to
+          something that will only match your pages.
+        </p>
+        <p>
+          If all your pages are located in a directory called mytest,
+          then use a matcher like '/mytest/*.xml' to avoid highjacking
+          the processing for all the other requests.
+        </p>
+        <p class="instruction">
+          Add a new pipeline in your project sitemap and set the matcher
+          to '/mytest/*.xml'.
+        </p>
+        <p>
+          The new pipeline should look like this and does nothing so far.
+        </p>
+<source><![CDATA[
+<!--Custom Pipeline for my bad html-pages-->        
+<map:pipeline>
+    <map:match pattern="mytest/*.xml">
+
+    </map:match>
+</map:pipeline>]]></source>
+        <p class="instruction">
+          Open the 'forrest.xmap', navigate to the file-resolver-section,
+          copy the four lines for handling *.html files and paste them into
+          your new pipeline.
+        </p>
+
+<source><![CDATA[
+<!--Custom Pipeline for my bad html-pages-->        
+<map:pipeline>
+    <map:match pattern="mytest/*.xml">
+      <map:generate src="{project:content.xdocs}{uri}.html" type="html"/>
+      <map:transform src="{forrest:stylesheets}/html2document.xsl"/>
+      <map:transform type="idgen"/>
+      <map:serialize type="xml-document"/>
+    </map:match>
+</map:pipeline>]]></source>
+        <p>
+          Your custom pipeline will now behave exactly like the standard
+          html-handler. Now all that is left to be done is creating the
+          custom transformation and adding it the pipeline.
+        </p>
+        <p class="instruction">
+          Design and test a new XSL-Transformation that removes the
+          unwanted elements and save it in your project's stylesheet
+          directory, usually src\documentation\resources\stylesheets
+          (defined in project.stylesheets-dir of forrest.properties),
+          which is central storage for all stylesheets in a project.
+        </p>
+        <fixme author="open">
+          I'm unclear about the translation from the property
+          project.stylesheets-dir to the variable {forrest:stylesheets}.
+          How and where does it take place and why are the names different?
+          That seems very confusing!          
+        </fixme>
+        <p class="instruction">
+          Add the new transformation as a new line, straight after the
+          generator, and save the changes. 
+        </p>
+<source><![CDATA[
+<!--Custom Pipeline for my bad html-pages-->        
+<map:pipeline>
+    <map:match pattern="mytest/*.xml">
+      <map:generate src="{project:content.xdocs}{uri}.html" type="html" />
+      <strong><map:transform src="{forrest:stylesheets}/fixMyBadHTML.xsl"/></strong>
+      <map:transform src="{forrest:stylesheets}/html2document.xsl" />
+      <map:transform type="idgen" />
+      <map:serialize type="xml-document"/>
+    </map:match>
+</map:pipeline>]]></source>
+        <p>
+          Done! You have just added your own custom-processing.
+          Don't forget to view the pages to verify that it is working
+          properly.
+        </p>      
+        <note>
+          Our pipeline does not exactly do what the original pipeline does.
+          To make things easier, we omitted the internationalization part
+          in our pipeline. So if you need to create multi-language sites,
+          make sure that you adjust your pipeline accordingly.
+        </note>
+
+      </section>
+  </steps>
+</howto>

Propchange: forrest/trunk/docs-author/content/xdocs/howto/howto-custom-html-source.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/docs-author/content/xdocs/howto/howto-understand-pipelines.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/docs-author/content/xdocs/howto/howto-understand-pipelines.xml?view=auto&rev=158888
==============================================================================
--- forrest/trunk/docs-author/content/xdocs/howto/howto-understand-pipelines.xml (added)
+++ forrest/trunk/docs-author/content/xdocs/howto/howto-understand-pipelines.xml Wed Mar 23 22:53:03 2005
@@ -0,0 +1,549 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  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 howto PUBLIC "-//APACHE//DTD How-to V2.0//EN" "http://forrest.apache.org/dtd/howto-v20.dtd">
+<howto>
+  <header>
+    <title>How to understand html processing and sitemap pipelines</title>
+    <abstract>
+      An introduction to the default processing pipeline for
+      HTML pages.
+    </abstract>
+    <last-modified-content-date date="2005-03-23" />
+  </header>
+
+  <audience title="Intended Audience">
+    <p>
+      Everybody who wants to learn more about Forrest's pipelines in general.
+    </p>
+    <p>
+      Users who want to integrate HTML pages that require custom adjustments.
+    </p>
+  </audience>
+
+  <purpose title="Purpose">
+    <p>
+      Understanding the way documents are processed is essential to
+      extending Forrest for your specialsed needs.
+    </p>
+    <p>
+      This HowTo explains the Cocoon sitemap pipelines by guiding you
+      step-by-step through the processing of a request for an html document.
+    </p>
+  </purpose>
+
+  <prerequisites title="Prerequisites">
+    <p>To follow these instructions you will need:</p>
+    <ol>
+      <li>
+        A basic understanding of Cocoon pipelines and their components.
+        You should know about matchers, generators, transformers and
+        serializers and have a rough idea how they work together in
+        a pipeline. (A good place to start learning about Cocoon is
+        <a href="ext:cocoon/concepts">Understanding Apache Cocoon</a>.)
+      </li>
+      <li>
+        If you want to follow the examples right through your Forrest,
+        a current version of Forrest installed on your system and
+        readable by you.
+      </li>
+    </ol>
+  </prerequisites>
+
+  <steps title="Understanding the HTML-Pipeline">
+    <section id="example">
+      <title>Driven by Example</title>
+      <p>
+        The best way to learn about Forrest pipelines is follow
+        the processing of an imaginary request through the forrest
+        machinery.
+      </p>
+      <p>
+        So let's see what happens, when a client asks Forrest to
+        serve the document
+        <br />
+        'http://some.domain.org/mytest/mybad.html'.
+      </p>
+    </section>
+
+    <section id="sitemap">
+      <title>Finding the Sitemap</title>
+
+      <p>
+        Like all applications based on Apache Coocon, each request for
+        a given document is processed by searching a sitemap for a
+        matching processing pipeline. With Forrest, this core sitemap
+        is found in the file
+        'main\webapp\sitemap.xmap' in Forrest's program directory.
+      </p>
+
+      <p class="instruction">
+        Open the file 'main\webapp\sitemap.xmap' in Forrest's
+        program directory with a text editor of your choice.
+      </p>
+      <note>
+        Any simple text editor will suffice, since the XML in
+        this file is quite simple in structure and easy to read.
+      </note>
+
+      <p>
+        To help you to easily follow the next steps, we have added
+        comments and anchors to 'sitemap.xmap',
+        so that you can quickly jump to all relevant sections
+        and read them more easily.
+      </p>
+
+      <p class="instruction">
+        Follow this link to the
+        <a href="sitemap.xmap.html#Start+of+Sitemap">
+          start of the Sitemap.
+        </a>
+      </p>
+
+      <p>
+        As the comment explains, this sitemap is the starting point
+        for all requests. So even if there are other sitemaps
+        (which we will see later on), we always start looking for a
+        matching pattern right here.
+      </p>
+    </section>
+
+    <section id="pipelines">
+      <title>Find the Beginning of the Pipelines Section</title>
+
+      <p>
+        Modular as everything else in Cocoon, Forrest's sitemap
+        starts with a long list of declarations for all the
+        components used later on. We can safely ignore these at
+        the moment.
+      </p>
+      <p class="instruction">
+        So let's skip right to the start of the
+        Pipelines-Section. Search for &lt;map:pipelines&gt; or
+        follow this link to the
+        <a href="sitemap.xmap.html#Start+of+Pipelines">
+          beginning of the pipelines-element
+        </a>
+      </p>
+
+      <p>
+        Within the pipelines-element you will find a long list
+        of pipeline-Elements (no trailing 's'), each one of them defining a
+        processing pipeline within Forrest.
+      </p>
+
+      <p>
+        When handling a request, Forrest will check the
+        Pipelines from top to bottom until it encounters a
+        Pipeline that will take care of our request.
+      </p>
+    </section>
+
+    <section id="matches">
+      <title>Looking for a Match</title>
+
+      <p>
+        Like all Coocoon applications, Forrest knows which
+        pipeline to use for processing a certain request by
+        looking at the entry criteria for each pipeline it comes
+        across. These can be a match against a given pattern,
+        the test if a certain files exists or one of many other
+        possible tests that Cocoon supports.
+      </p>
+
+      <p class="instruction">
+        To better know what we are talking about, let's follow
+        Forrest down the list to the
+        <a href="sitemap.xmap.html#Test+for+First+Pipeline">
+          Test for the First Pipeline
+        </a>
+        !
+      </p>
+
+      <p>
+        Here you can see a very common type of test. The
+        requested file- (and pathname) is compared to a pattern
+        '*.xlex' that would match if our request ended with
+        '.xlex' and had no pathname. Since it doesn't, we don't
+        have a match and have to keep looking!
+      </p>
+
+      <p class="instruction">
+        Skip forward until we find the
+        <a href="sitemap.xmap.html#First+Match+for+%22**%2F*.html%22">
+          First Match for "**/*.html"
+        </a>
+        (&lt;map:match pattern="**/*.html"&gt;).
+      </p>
+    </section>
+
+    <section id="html-pipeline">
+      <title>Processing in the '**/*.html' Pipeline</title>
+      <p>  
+        Let's take a quick look at this pipeline to understand
+        what's happening here:
+      </p>
+<source><![CDATA[
+<map:match pattern="**/*.html">
+    <map:aggregate element="site">
+      <map:part src="cocoon:/skinconf.xml"/>
+      <map:part src="cocoon:/build-info"/>
+      <map:part src="cocoon:/{1}/tab-{2}.html"/>
+      <map:part src="cocoon:/{1}/menu-{2}.html"/>
+      <map:part src="cocoon:/{1}/body-{2}.html"/>
+    </map:aggregate>
+    <map:call resource="skinit">
+      <map:parameter name="type" value="site2xhtml"/>
+      <map:parameter name="path" value="{0}"/>
+    </map:call>
+</map:match>]]></source>
+      <p>
+        In the first part of this pipeline, the
+        aggregate-element assembles information required to build
+        a Forrest page with menu and tabs from different sources.
+        Then the call to the skinit-resource picks up the
+        aggregated info and generates a page in the
+        style of the current skin. That's easy, isn't it?
+      </p>
+      <p>
+        Well, the complex part begins, when we take a closer look at
+        the sources of the aggregation.
+      </p>
+      <source><![CDATA[<map:part src="cocoon:/{1}/body-{2}.html"/>]]></source>
+      <p>
+        This mysterious element is most easily explained as a
+        secondary request to the Forrest system.
+      </p>
+      <p>
+        The 'cocoon:'-part is called a pseudo-protocol and tells the
+        processor to ask Forrest for the resource named behind
+        the colon, process that request and feed the output as input
+        back into our pipeline.
+        (The 'pseudo' goes back to the fact that unlike
+        'http' or 'ftp', which are real protocols, you can use cocoon:
+        only within the cocoon environments as only they will know what to
+        do with it.)
+      </p>
+      <p>
+        So even though we have already seen the end of our pipeline
+        (the skinning), we still don't know, what goes into the skinning and
+        where it comes from. To find out, we have to look at the sources
+        of the aggregation.
+      </p>
+    </section>
+
+    <section id="protocols">
+      <title>Following the Pseudo-Protocols</title>
+      <p>
+        To find out what goes into our aggregation, we'll need to look
+        at the pipeline that is called by
+      </p>
+      <source><![CDATA[<map:part src="cocoon:/{1}/body-{2}.html"/>]]></source>
+      <p>
+        To do that, it's always a good idea to write down what this
+        call actually looks like when all the variables are replaced by real
+        values.
+        A safe way to do that is to look at the matcher to start with,
+        build a list of the numbered variables and their meaning in the
+        current context and then assemble the actual expression(s) from it.
+      </p>
+      
+      <p>In our example the matcher pattern
+       <code>**/*.html</code> is applied to the request-name
+       <code>mytest/mybad.html</code>, so we have three variables
+       altogether:
+      </p>
+      <table>
+        <tr>
+          <td>%0</td>
+          <td>mytest/mybad.html</td>
+          <td>the whole pathname</td>
+        </tr>
+        <tr>
+          <td>%1</td>
+          <td>mytest/</td>
+          <td>the first match</td>
+        </tr>
+        <tr>
+          <td>%2</td>
+          <td>mybad</td>
+          <td>the second match</td>
+        </tr>
+      </table>
+      <p>If we insert that into </p>
+      <source><![CDATA[<map:part src="cocoon:/{1}/body-{2}.html"/>]]></source>
+      <p>we get</p>
+      <source><![CDATA[<map:part src="cocoon:/mytest/body-mybad.html"/>]]></source>
+      <p>
+        As you can easily tell, we are suddenly calling for a whole
+        new document. Let's see where that takes us:
+      </p>
+    </section>
+    <section id="call">
+      <title>Second Call for Content</title>
+      <p>
+        Processing of cocoon-calls is not much different from
+        normal requests by a client. When you launch a call like
+      </p>
+      <source><![CDATA[<map:part src="cocoon:/mytest/body-mybad.html"/>]]></source>  
+      <p>
+        Forrest will once again start searching its main sitemap
+        from the beginning and look for a pipeline to match that call.
+      </p>
+
+      <p class="instruction">
+         Search for '**body-*.html' from the beginning of the
+         sitemap or jump to the
+         <a href="sitemap.xmap.html#First+Match+for+%27**body-*.html%27">First Match for '**body-*.html'</a>
+         to see where we find our next match.
+      </p>
+    </section>
+    <section id="match-1">
+      <title>First Match for '**body-*.html'</title>
+       <p>
+         Our first match is different to the previous ones because
+         there is a second condition placed inside the matcher.
+         Doing the replacements
+       </p>
+<source><![CDATA[
+<map:select type="exists">
+   <map:when test="{project:content.xdocs}mytests/mybad.ehtml">]]></source>
+       <p>
+         we quickly discover that there can't be a file of
+         that name in the project-directory.
+         <br />
+         (The variable '{project:content.xdocs}' is always replaced with
+         the name of your project directory that you can change
+         in the 'forrest.properties'-file!)
+       </p>
+       <p>
+         So we have a pipeline, but it doesn't do anything.
+         In this case Forrest will simply keep looking for
+         the next match further down.
+       </p>
+    </section>
+    <section id="match-2">
+      <title>Second Match for '**body-*.html'</title>
+      <p class="instruction">
+         Continue searching downwards for '**body-*.html' in the
+         sitemap-file or jump directly to the
+         <a href="sitemap.xmap.html#Second+Match+for+%27**body-*.html%27">Second Match for '**body-*.html'</a>.
+      </p>
+      <p>
+        Looking at the pipeline that handles the request, we see that
+        the cocoon-protocol is once again invoked
+      </p>
+      <source><![CDATA[<map:generate src="cocoon:/{1}{2}.xml"/>]]></source>  
+      <p>
+        this time as a direct generator of input for our pipeline.
+      </p>
+      <p>
+        So once again we ask Forrest to process a request for content.
+        To know what matcher to look for, let's first expand the variables:
+      </p>
+      <p>
+        In our example the matcher pattern
+        <code>**body-*.html</code> is applied to the request-name
+        <code>mytest/body-mybad.html</code>.
+        Which means that we have three variables altogether:
+      </p>
+      <table>
+        <tr>
+          <td>%0</td>
+          <td>mytest/body-mybad.html</td>
+          <td>the whole pathname</td>
+        </tr>
+        <tr>
+          <td>%1</td>
+          <td>mytests/</td>
+          <td>the first match</td>
+        </tr>
+        <tr>
+          <td>%2</td>
+          <td>mybad</td>
+          <td>the second match</td>
+        </tr>
+      </table>
+      <p>
+        If we insert that into
+      </p>
+      <source><![CDATA[<map:generate src="cocoon:/{1}{2}.xml"/>]]></source>
+      <p>
+        we get
+      </p>
+      <source><![CDATA[<map:generate src="cocoon:/mytests/mybad.xml"/>]]></source>
+    </section>
+    <section id="match-3">
+      <title>Third Call for Content</title>
+      <p class="instruction">
+        So let's scan the main sitemap looking for a match for
+        '/mytests/mybad.xml'.
+      </p>
+      <p>
+        We find it in the pattern
+        <a href="sitemap.xmap.html#First+Match+for+%27**.xml%27">'**.xml'></a>,
+        which is the standard handling for all xml-requests.
+      </p>
+      <p>
+        Since our request fulfils none of the secondary criteria in
+        this pipeline, it falls right through to the map:mount-element
+        at the end:
+        </p>
+      <source><![CDATA[<map:mount uri-prefix="" src="forrest.xmap" check-reload="yes" />]]></source>
+      <p>
+        which makes Forrest load and process a secondary sitemap,
+        the file 'forrest.xmap' in the same directory.
+      </p>
+      <p class="instruction">
+        Open the file 'forrest.xmap' and continue the search for a
+        matching pattern.
+      </p>
+      <p>
+        Our search leads us to the 
+        <a href="forrest.xmap.html#Second+Match+for+%27**.xml%27">
+          Second Match for '**.xml'
+        </a>,
+        a pipeline designed to handle internationalisation if that
+        feature is configured. Since it is not, all it does is
+        call the file-resolver-resource with the full pathname of
+        our file but no extension.
+      </p>
+<source><![CDATA[
+<map:call resource="file-resolver">
+  <map:parameter name="uri" value="mytests/mybad"/>
+</map:call>]]></source>
+    </section>
+    <section id="file">
+      <title>Introducing the File-Resolver</title>
+      <p class="instruction">
+        To find out more about the working of the file-resolver,
+        search for the definition of the
+        <a href="forrest.xmap.html#Definition+of+File-Resolver-Resource">
+          &lt;map:resource name="file-resolver"&gt;
+        </a>
+        higher up in the file.
+      </p>
+      <p>
+        Here you will find a pipeline that tests for the existence of
+        the file with different extensions. '.html' is second in this
+        list and leads to the processing steps shown below:
+      </p>
+    </section>
+
+    <section id="process-html">
+      <title>html-Default Processing</title>
+      <p>
+        The default processing of html-files consists of four
+        processing steps:
+      </p>
+      <ol>
+        <li>
+          <code>&lt;map:generate src="{project:content.xdocs}{uri}.html" type="html"/&gt;</code><br/>
+            Using the html-generator, Forrest reads the html-document
+            from file and uses JTidy to clean up and convert it to xml
+            (which is required for all processing in cocoon pipelines).
+            At the output of this transformer we will have a valid
+            XHTML-document althought it might still contain some unwanted
+            elements. We'll deal with those later (see
+            <a href="site:howto/custom-html-source">When to customize</a>).
+        </li>
+        <li>
+            <code>&lt;map:transform src="{forrest:stylesheets}/html2document.xsl"/&gt;</code><br/>
+          Using the standard stylesheet 'html2document.xsl', this XHTML is 
+          transformed into Forrest standard document format.
+        </li>
+        <li>
+          <code>&lt;map:transform type="idgen"/&gt;</code><br/>
+          This step generates IDs required for navigation within the page.
+        </li>
+        <li>
+          <code>&lt;map:serialize type="xml-document"/&gt;</code><br/>
+          Finally the document is serialized as XML and returned to the
+          calling pipeline.
+        </li>
+      </ol>
+      <p>
+        As a result, we now hand back the content of the html-document
+        in Forrest standard document format to the calling pipeline
+      </p>
+      <note>
+        To take a look at the output of this pipeline you can simply
+        point you browser to 'http://localhost:8888/mytest/mybad.xml'
+        (assuming that you are currently running Forrest on your
+        machine and there is an html-page of that name!).
+      </note>
+    </section>
+    <section id="body">
+      <title>Returning to the '**body-*.html'-Pipeline</title>
+      <p>
+        On returning into the
+        <a href="sitemap.xmap.html#Returning+to+the+%27**body-*.html%27+Pipeline">'**body-*.html' pipeline</a>,
+        procesing continues with the next components in this pipeline:
+      </p>
+      <ul>
+        <li>
+          <strong>idgen</strong> will generate unique IDs for all elements
+          that need to be referenced within a page (mainly headlines).
+        </li>
+        <li>
+          <strong>xinclude</strong> would process any xinclude statements
+          in the source.
+          Since HTML does not support this mechanism, nothing happens
+          in our example.
+        </li>
+        <li>
+          <strong>linkrewriter</strong> adjusts links between pages
+          so that they will still work in the final Forrest output
+          directory structure. It also resolves any special Forrest links.
+        </li>
+        <li>
+          The final transformation, as the name suggests, will take
+          care of reporting broken site-links.
+        </li>
+        <li>
+          The call to 'skinit' prepares the page body for presentation
+          within the selected skin.
+        </li>
+      </ul>
+      <note>
+        To take a look at the output of this pipeline you can simply
+        point you browser to 'http://localhost:8888/mytest/body-mybad.html'
+        (assuming that you are currently running Forrest on your machine
+        and there is an html-page of that name!).
+      </note>
+    </section>
+
+    <section id="aggregate">
+      <title>Returning to the '**/*.html'-Pipeline</title>
+      <p>
+        At the end of this pipeline, processing returns the results into
+        the aggregation section of the
+        <a href="#html-pipeline">'**/*.html' Pipeline</a>,
+        merges it with other data, skins and serializes for presentation
+        in the requesting client.
+      </p>
+    </section>
+  </steps>
+
+  <extension title="Customizing the html pipeline">
+    <p>
+      See <a href="site:howto/custom-html-source">How to customize
+      processing of html source</a>
+    </p>
+  </extension>
+
+</howto>

Propchange: forrest/trunk/docs-author/content/xdocs/howto/howto-understand-pipelines.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: forrest/trunk/docs-author/content/xdocs/howto/index.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/docs-author/content/xdocs/howto/index.xml?view=diff&r1=158887&r2=158888
==============================================================================
--- forrest/trunk/docs-author/content/xdocs/howto/index.xml (original)
+++ forrest/trunk/docs-author/content/xdocs/howto/index.xml Wed Mar 23 22:53:03 2005
@@ -42,6 +42,10 @@
     <section>
       <title>Using Forrest</title>
       <ul>
+        <li><link href="site:understand-pipelines">How to understand html processing and sitemap pipelines</link>
+        </li>
+        <li><link href="site:custom-html-source">How to customize processing of html source</link>
+        </li>
         <li><link href="site:howto/pdf-tab">How to create a PDF document for each tab</link>
           - Describes the generation of a PDF document for each
           group of documents that is defined by a tab.

Added: forrest/trunk/docs-author/content/xdocs/howto/project_sitemap.xmap.html
URL: http://svn.apache.org/viewcvs/forrest/trunk/docs-author/content/xdocs/howto/project_sitemap.xmap.html?view=auto&rev=158888
==============================================================================
--- forrest/trunk/docs-author/content/xdocs/howto/project_sitemap.xmap.html (added)
+++ forrest/trunk/docs-author/content/xdocs/howto/project_sitemap.xmap.html Wed Mar 23 22:53:03 2005
@@ -0,0 +1,42 @@
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  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.
+-->
+<html>
+<head>
+<title>sitemap.xmap in the Project Documentation Directory</title>
+</head>
+<body>
+<h1>sitemap.xmap in the Project Documentation Directory</h1>
+<pre><![CDATA[
+<?xml version="1.0"?>
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+ <map:pipelines>
+]]></pre>
+
+<h2>Example pipeline for '**custom.xml'</h2>
+<pre><![CDATA[
+  <map:pipeline>
+   <map:match pattern="**custom.xml">
+    <map:generate src="{project:content.xdocs}{1}custom.xml" />
+    <map:transform src="{project:resources.stylesheets}/hello2document.xsl" />
+    <map:serialize type="xml"/>
+   </map:match>
+  </map:pipeline>
+ </map:pipelines>
+</map:sitemap>
+]]></pre>
+</body>
+</html>

Propchange: forrest/trunk/docs-author/content/xdocs/howto/project_sitemap.xmap.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/docs-author/content/xdocs/howto/sitemap.xmap.html
URL: http://svn.apache.org/viewcvs/forrest/trunk/docs-author/content/xdocs/howto/sitemap.xmap.html?view=auto&rev=158888
==============================================================================
--- forrest/trunk/docs-author/content/xdocs/howto/sitemap.xmap.html (added)
+++ forrest/trunk/docs-author/content/xdocs/howto/sitemap.xmap.html Wed Mar 23 22:53:03 2005
@@ -0,0 +1,684 @@
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  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.
+-->
+<html>
+<head>
+<title>Annotated core sitemap.xmap</title>
+</head>
+<body>
+<h1>sitemap.xmap</h1>
+<pre><![CDATA[
+<?xml version="1.0"?>
+<!-- ===============================================
+Default Forrest sitemap, defining the whole site.
+Delegates to the other *.xmap files.  See
+http://forrest.apache.org/docs/sitemap-ref.html
+
+$Revision: 1.12 $
+==================================================== -->
+]]></pre>
+
+<h2>Start of Sitemap</h2>
+<pre><![CDATA[
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  <map:components>
+    <map:generators default="file">
+      <map:generator name="file"      src="org.apache.cocoon.generation.FileGenerator" />
+      <map:generator name="html"
+                     src="org.apache.cocoon.generation.HTMLGenerator">
+        <jtidy-config>WEB-INF/jtidy.properties</jtidy-config>
+      </map:generator>
+      <map:generator name="exception"
+                  src="org.apache.cocoon.generation.ParseExceptionGenerator"/>
+      <!--
+      <map:generator name="html"      src="org.apache.cocoon.generation.HTMLGenerator">
+        <jtidy-config>jtidy.properties</jtidy-config>
+      </map:generator>
+      <map:generator name="directory" src="org.apache.cocoon.generation.DirectoryGenerator" />
+      -->
+      <map:generator name="notifier" src="org.apache.cocoon.sitemap.NotifyingGenerator" />
+      
+      <map:generator name="text2xml" logger="sitemap.generator.textgenerator"
+                     src="org.apache.cocoon.generation.TextGenerator">
+       <parameter name="localizable" value="true"/>
+      </map:generator>
+
+    </map:generators>
+
+    <map:transformers default="xslt">
+
+      <!-- Add values to skinconf that need extra processing like the color shades -->
+      <map:transformer name="skinconf" src="org.apache.forrest.conf.SkinconfTransformer"/>
+              
+      <!-- Generates @id attributes from <title> strings -->
+      <map:transformer name="idgen" src="org.apache.forrest.util.IdGeneratorTransformer">
+        <element>//*[local-name() = 'section']</element>
+        <id>title/text()</id>
+      </map:transformer>
+
+      <!-- Rewrites links, e.g. transforming href="site:index" to href="../index.html" -->
+      <!-- See http://forrest.apache.org/docs/sitemap-ref.html#linkrewriting_impl -->
+      <map:transformer name="linkrewriter" logger="sitemap.transformer.linkrewriter" src="org.apache.cocoon.transformation.LinkRewriterTransformer">
+        <link-attrs>href src</link-attrs>
+        <schemes>site ext</schemes>
+
+        <input-module name="site">
+          <input-module name="linkmap">
+            <file src="{src}" reloadable="true" />
+          </input-module>
+          <prefix>/site//</prefix>
+          <suffix>/@href</suffix>
+        </input-module>
+        <input-module name="ext">
+          <input-module name="linkmap">
+            <file src="{src}" reloadable="true" />
+          </input-module>
+          <prefix>/site/external-refs//</prefix>
+          <suffix>/@href</suffix>
+        </input-module>
+      </map:transformer>
+
+      <map:transformer name="xpath" logger="sitemap.transformer.xpath" src="org.apache.forrest.util.XPathTransformer" />
+      
+      <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer" logger="sitemap.transformer.xslt" pool-max="32" pool-min="8" pool-grow="2">
+        <use-request-parameters>false</use-request-parameters>
+        <use-browser-capabilities-db>false</use-browser-capabilities-db>
+        <use-deli>false</use-deli>
+        <transformer-factory>org.apache.xalan.processor.TransformerFactoryImpl</transformer-factory>
+        <!--<transformer-factory>net.sf.saxon.TransformerFactoryImpl</transformer-factory>-->
+        <!--<transformer-factory>com.icl.saxon.TransformerFactoryImpl</transformer-factory>-->
+        <!--<transformer-factory>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</transformer-factory>-->
+      </map:transformer>
+      
+      <map:transformer name="xsltc" src="org.apache.cocoon.transformation.TraxTransformer" logger="sitemap.transformer.xslt" pool-max="32" pool-min="8" pool-grow="2">
+        <use-request-parameters>false</use-request-parameters>
+        <use-browser-capabilities-db>false</use-browser-capabilities-db>
+        <use-deli>false</use-deli>
+        <transformer-factory>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</transformer-factory>
+      </map:transformer>
+
+      <map:transformer name="xslt-saxon"
+         pool-grow="2" pool-max="32" pool-min="8"
+         src="org.apache.cocoon.transformation.TraxTransformer">
+       <use-request-parameters>false</use-request-parameters>
+       <use-browser-capabilities-db>false</use-browser-capabilities-db>
+       <xslt-processor-role>saxon</xslt-processor-role>
+     </map:transformer>
+      
+      <map:transformer name="xinclude" src="org.apache.cocoon.transformation.XIncludeTransformer" logger="sitemap.transformer.xinclude" pool-grow="2" pool-max="16" pool-min="2" />
+
+      <map:transformer name="cinclude" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.transformation.CIncludeTransformer" logger="sitemap.transformer.cinclude"/>
+   <map:transformer name="pattern"
+                    src="org.apache.cocoon.transformation.PatternTransformer" 
+                    logger="sitemap.transformer.pattern">
+    <parameter name="groups" value="true"/>
+   </map:transformer>
+   <map:transformer name="lexer"
+                    src="org.apache.cocoon.transformation.LexicalTransformer" 
+                    logger="sitemap.transformer.lexer">
+    <parameter name="localizable" value="true"/>
+   </map:transformer>
+   <map:transformer name="parser"
+                    src="org.apache.cocoon.transformation.ParserTransformer" 
+                    logger="sitemap.transformer.parser">
+    <parameter name="flatten" value="true"/>
+    <parameter name="recovery" value="true"/>
+    <parameter name="localizable" value="true"/>
+   </map:transformer>
+    </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">
+        <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>
+        <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
+        <encoding>UTF-8</encoding>
+      </map:serializer>
+
+      <map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
+
+      <map:serializer name="xml-document" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer">
+        <cdata-section-elements>source</cdata-section-elements>
+        <doctype-public>-//APACHE//DTD Documentation V1.3//EN</doctype-public>
+        <doctype-system>document-v13.dtd</doctype-system>
+      </map:serializer>
+
+      <map:serializer name="links" src="org.apache.cocoon.serialization.LinkSerializer">
+        <encoding>ISO-8859-1</encoding>
+      </map:serializer>
+      
+      <map:serializer name="svgxml" src="org.apache.cocoon.serialization.XMLSerializer" mime-type="image/svg+xml">
+        <doctype-public>-//W3C//DTD SVG 1.0//EN</doctype-public>
+        <doctype-system>http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd</doctype-system>
+      </map:serializer>
+      <map:serializer logger="sitemap.serializer.text" mime-type="text/plain" name="text" src="org.apache.cocoon.serialization.TextSerializer">
+        <encoding>UTF-8</encoding>
+      </map:serializer>
+      
+     <!--
+      <map:serializer mime-type="application/x-shockwave-flash" name="swf" src="org.apache.cocoon.serialization.SWFSerializer"/>
+      <map:serializer mime-type="application/msword" name="fo2rtf" src="org.apache.cocoon.serialization.RTFSerializer"/>
+      -->
+    </map:serializers>
+
+    <map:matchers default="wildcard">
+      <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
+      <map:matcher name="regexp" src="org.apache.cocoon.matching.RegexpURIMatcher"/>
+    </map:matchers>
+
+    <map:selectors>
+      <map:selector logger="sitemap.selector.exists" name="exists" src="org.apache.forrest.sourceexists.SourceExistsSelector" />
+   <map:selector logger="sitemap.selector.exception" name="exception"
+                 src="org.apache.cocoon.selection.ExceptionSelector">
+     <exception name="syntax" class="net.sourceforge.chaperon.process.ParseException"/>
+     <exception class="java.lang.Throwable" unroll="true"/>
+   </map:selector>
+    </map:selectors>
+
+    <map:pipes default="caching">
+      <map:pipe name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
+      <!--
+      <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
+      <map:pipe name="profile-caching" src="org.apache.cocoon.components.profiler.ProfilingCachingProcessingPipeline"/>
+      <map:pipe name="profile-noncaching" src="org.apache.cocoon.components.profiler.ProfilingNonCachingProcessingPipeline"/>
+      -->
+    </map:pipes>
+  </map:components>
+
+  <!-- NOTE: the 'links view' is no longer used to discover a page's links.
+       Instead of filterlinks.xsl, use cli.xconf include/exclude nodes to define which pages to render.
+  <map:views>
+    <map:view name="links" from-position="last">
+      <map:transform src="{forrest:stylesheets}/filterlinks.xsl">
+        <map:parameter name="ctxbasedir" value="{realpath:.}/"/>
+      </map:transform>
+      <map:serialize type="links"/>
+    </map:view>
+  </map:views>
+  -->
+
+  <map:resources>
+    <map:resource name="skinit">
+        <map:select type="exists">
+          <map:when test="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
+            <map:transform src="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
+              <map:parameter name="notoc" value="{notoc}"/>
+              <!-- For backwards-compat with 0.2 - 0.4 skins -->
+              <map:parameter name="isfaq" value="{notoc}"/>
+              <map:parameter name="nopdf" value="{nopdf}"/>
+              <map:parameter name="path" value="{path}"/>
+              <map:parameter name="config-file" value="{project:skinconf}"/>
+            </map:transform>
+          </map:when>
+          <map:otherwise>
+            <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/html/{type}.xsl">
+              <map:parameter name="notoc" value="{notoc}"/>
+              <!-- For backwards-compat with 0.2 - 0.4 skins -->
+              <map:parameter name="isfaq" value="{notoc}"/>
+              <map:parameter name="nopdf" value="{nopdf}"/>
+              <map:parameter name="path" value="{path}"/>
+              <map:parameter name="config-file" value="{project:skinconf}"/>
+            </map:transform>
+          </map:otherwise>
+        </map:select>
+      <map:serialize/>
+    </map:resource>
+
+  </map:resources>
+]]></pre>
+
+  <h2>Start of Pipelines</h2>
+<pre><![CDATA[
+  <!-- =========================== Pipelines ================================= -->
+  <map:pipelines>
+
+  <map:pipeline type="caching" internal-only="true">
+]]></pre>
+
+<h2>Test for First Pipeline</h2>
+<pre><![CDATA[
+      <map:match pattern="*.xlex">
+        <map:select type="exists">
+          <map:when test="resources/chaperon/grammars/{1}.xlex">
+            <map:read src="resources/chaperon/grammars/{1}.xlex"/>
+          </map:when>
+          <map:otherwise>
+            <map:generate  type="text2xml"   src="{forrest:context}/resources/chaperon/grammars/{1}.grm"/>
+            <map:transform type="lexer"  src="{forrest:context}/resources/chaperon/grammars/grm.xlex"/>
+            <map:transform type="parser" src="{forrest:context}/resources/chaperon/grammars/grm.xgrm"/>
+            <map:transform               src="{forrest:context}/resources/chaperon/stylesheets/text4regex.xsl"/>
+            <map:transform type="lexer"  src="{forrest:context}/resources/chaperon/grammars/regex.xlex"/>
+            <map:transform type="parser" src="{forrest:context}/resources/chaperon/grammars/regex.xgrm"/>
+            <map:transform               src="{forrest:context}/resources/chaperon/stylesheets/grm2xlex.xsl"/>
+            <map:serialize type="xml"/>
+          </map:otherwise>
+        </map:select>
+      </map:match>
+    </map:pipeline>
+]]></pre>
+    
+<h2>Insertion Point for Project Sitemap</h2>    
+<pre><![CDATA[
+      <!--
+         This is the user pipeline, that can answer requests instead
+         of the Forrest one, or let requests pass through.
+         To take over the rendering of a file it must match the file name and path.
+         To take over the generation of the intermediate format, it must give
+         Forrest the same filename but ending with xml, and a DTD that Forrest
+         recognizes.
+      -->
+      <map:pipeline internal-only="false">
+           <map:select type="exists">
+             <map:when test="{project:sitemap}">
+               <map:mount uri-prefix=""
+                          src="{project:sitemap}" 
+                          check-reload="yes" 
+                          pass-through="true"/>
+             </map:when>
+           </map:select>
+      </map:pipeline>
+      
+      <map:pipeline internal-only="false">
+        <map:select type="exists">
+          <map:when test="{project:temp-dir}/internal.xmap">
+            <map:mount uri-prefix="" src="{project:temp-dir}/internal.xmap" check-reload="yes" pass-through="true"/>
+          </map:when>
+        </map:select>
+      </map:pipeline>
+      
+      <map:pipeline internal-only="false">
+         <map:match pattern="skinconf.xml">
+           <map:generate src="{project:skinconf}" />
+           <map:transform src="{forrest:stylesheets}/strip-doctype.xsl"/>
+           <map:transform src="{forrest:stylesheets}/upgrade-skinconf.xsl"/>
+           <map:select type="exists">
+             <map:when test="{project:skins-dir}{forrest:skin}/skinconf.xsl">
+               <map:transform src="{project:skins-dir}{forrest:skin}/skinconf.xsl"/>
+             </map:when>
+           </map:select>
+           <map:select type="exists">
+             <map:when test="{forrest:context}/skins/{forrest:skin}/skinconf.xsl">
+               <map:transform src="{forrest:context}/skins/{forrest:skin}/skinconf.xsl"/>
+             </map:when>
+           </map:select>
+           <map:transform src="{forrest:context}/skins/common/skinconf.xsl"/>
+           <map:transform type="skinconf"/>
+           <map:serialize type="xml" />
+         </map:match>
+
+         <!-- Add some build information, which is added to the html head -->
+         <map:match pattern="build-info">
+           <map:generate src="{project:temp-dir}/build-info.xml"/>
+           <map:serialize type="xml"/>
+         </map:match>
+       </map:pipeline>
+       
+    <map:pipeline internal-only="false">
+      <!-- ============================================================ -->
+      <!-- SOURCE FORMATS                                               -->
+      <!--                 Raw XML sources, typically doc-v12 format    -->
+      <!-- ============================================================ -->
+      <!-- http://forrest.apache.org/docs/sitemap-ref.html#source_pipelines -->
+]]></pre>
+     
+<h2>First Match for '**.xml'</h2>     
+<pre><![CDATA[
+      <!-- Body content -->
+      <map:match pattern="**.xml">
+     
+        <map:match pattern="linkmap.xml">
+          <map:mount uri-prefix="" src="linkmap.xmap" check-reload="yes" />
+        </map:match>
+              
+        <map:match pattern="changes.xml">
+          <map:mount uri-prefix="" src="status.xmap" check-reload="yes" />
+        </map:match>
+
+        <map:match pattern="todo.xml">
+          <map:mount uri-prefix="" src="status.xmap" check-reload="yes" />
+        </map:match>
+
+        <map:match pattern="**dtdx.xml">
+          <map:mount uri-prefix="" src="dtd.xmap" check-reload="yes" />
+        </map:match>
+
+        <map:match pattern="forrest-issues.xml">
+          <map:mount uri-prefix="" src="issues.xmap" check-reload="yes" />
+        </map:match>
+
+        <map:match pattern="**faq.xml">
+          <map:mount uri-prefix="" src="faq.xmap" check-reload="yes" />
+        </map:match>
+
+        <map:match pattern="community/**index.xml">
+          <map:mount uri-prefix="" src="forrest.xmap" check-reload="yes" />
+        </map:match>
+
+        <map:match pattern="community/*/**.xml">
+          <map:mount uri-prefix="" src="revisions.xmap" check-reload="yes" />
+        </map:match>
+
+        <!-- wholesite is preferred; site is here for compatibility -->
+        <map:match pattern="wholesite.xml">
+          <map:mount uri-prefix="" src="aggregate.xmap" check-reload="yes" />
+        </map:match>
+        <map:match pattern="site.xml">
+          <map:mount uri-prefix="" src="aggregate.xmap" check-reload="yes" />
+        </map:match>
+
+        <!-- Lucene index update and search -->
+        <map:match pattern="lucene-*.xml">
+          <map:mount uri-prefix="" src="search.xmap" check-reload="yes"/>
+        </map:match>
+
+        <!-- Default source types -->
+        <map:mount uri-prefix="" src="forrest.xmap" check-reload="yes" />
+
+      </map:match>
+
+      <!-- Menu content -->
+      <map:match pattern="abs-menulinks">
+        <map:mount uri-prefix="" src="menu.xmap" check-reload="yes" />
+      </map:match>
+
+      <map:match pattern="**menulinks-*">
+        <map:mount uri-prefix="" src="menu.xmap" check-reload="yes" />
+      </map:match>
+
+      <!-- Link maps -->
+      <map:match pattern="abs-linkmap">
+        <map:mount uri-prefix="" src="linkmap.xmap"/>
+      </map:match>
+
+      <map:match pattern="**linkmap-*">
+        <map:match pattern="linkmap-wholesite.*">
+          <map:mount uri-prefix="" src="aggregate.xmap" check-reload="yes" />
+        </map:match>
+        <map:match pattern="linkmap-site.*">
+          <map:mount uri-prefix="" src="aggregate.xmap" check-reload="yes" />
+        </map:match>
+
+        <map:mount uri-prefix="" src="linkmap.xmap" check-reload="yes" />
+      </map:match>
+
+    </map:pipeline>
+
+
+    <!-- ============================================================ -->
+    <!-- INTERMEDIATE FORMATS                                         -->
+    <!--                          Tabs, menus and body HTML.          -->
+    <!--                       Called from output format pipelines    -->
+    <!-- ============================================================ -->
+    <!-- http://forrest.apache.org/docs/sitemap-ref.html#intermediate_pipelines -->
+
+    <map:pipeline internal-only="false">
+
+      <!-- External matches -->
+      <!-- (HTML rendered directly from special formats) -->
+      <map:match pattern="**body-faq.html">
+        <map:mount uri-prefix="" src="faq.xmap" check-reload="yes" />
+      </map:match>
+]]></pre>
+
+<h2>First Match for '**body-*.html'</h2>
+<pre><![CDATA[
+      <map:match pattern="**body-*.html">
+        <map:select type="exists">
+          <map:when test="{project:content.xdocs}{1}{2}.ehtml">
+            <map:generate src="{project:content.xdocs}{1}{2}.ehtml" />
+            <map:transform src="{forrest:stylesheets}/html2htmlbody.xsl" />
+            <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
+            <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
+            <map:serialize type="xml" />
+          </map:when>
+        </map:select>
+      </map:match>
+]]></pre>
+
+<h2>Second Match for '**body-*.html'</h2>
+<pre><![CDATA[
+      <!-- Default matches -->
+      <!-- (HTML rendered from doc-v11 intermediate format -->
+      <map:match pattern="**body-*.html">
+        <map:generate src="cocoon:/{1}{2}.xml"/>
+]]></pre>
+
+<h2>Returning to the '**body-*.html' Pipeline</h2>
+<pre><![CDATA[
+        <map:transform type="idgen"/>
+        <map:transform type="xinclude"/>
+        <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
+        <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
+        <map:call resource="skinit">
+          <map:parameter name="type" value="document2html"/>
+          <map:parameter name="path" value="{1}{2}.html"/>
+          <map:parameter name="notoc" value="false"/>
+        </map:call>
+      </map:match>
+
+      <map:match pattern="**menu-*.html">
+        <map:generate src="cocoon:/{1}book-{2}.html"/>
+        <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
+        <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
+        <map:call resource="skinit">
+          <map:parameter name="type" value="book2menu"/>
+          <map:parameter name="path" value="{1}{2}.html"/>
+        </map:call>
+      </map:match>
+
+      <map:match pattern="**tab-*.html">
+        <map:mount uri-prefix="" src="tabs.xmap" check-reload="yes" />
+      </map:match>
+      
+      <map:match pattern="**i18n-*.html">
+        <map:mount uri-prefix="" src="i18n.xmap" check-reload="yes" />
+      </map:match>
+
+      <map:match pattern="**book-*.html">
+        <map:mount uri-prefix="" src="menu.xmap" check-reload="yes" />
+      </map:match>
+
+    </map:pipeline>
+
+    <!-- ============================================================ -->
+    <!-- OUTPUT FORMATS                                               -->
+    <!--                  Serves content directly to the user         -->
+    <!-- +==========================================================+ -->
+    <!-- http://forrest.apache.org/docs/sitemap-ref.html#output_pipelines -->
+
+    <map:pipeline internal-only="false">
+      <map:select type="exists">
+        <map:when test="{project:temp-dir}/output.xmap">
+          <map:mount uri-prefix="" src="{project:temp-dir}/output.xmap" check-reload="yes" pass-through="true"/>
+        </map:when>
+      </map:select>
+    </map:pipeline>
+
+    <map:pipeline internal-only="false">
+
+      <map:match pattern="*.html">
+        <map:aggregate element="site">
+          <map:part src="cocoon:/skinconf.xml"/>
+          <map:part src="cocoon:/build-info"/>
+          <map:part src="cocoon:/tab-{0}"/>
+          <map:part src="cocoon:/menu-{0}"/>
+          <map:part src="cocoon:/body-{0}"/>
+        </map:aggregate>
+        <map:call resource="skinit">
+          <map:parameter name="type" value="site2xhtml"/>
+          <map:parameter name="path" value="{0}"/>
+        </map:call>
+      </map:match>
+]]></pre>
+
+<h2>First Match for "**/*.html"</h2>
+<pre><![CDATA[
+  <map:match pattern="**/*.html">
+    <map:aggregate element="site">
+      <map:part src="cocoon:/skinconf.xml"/>
+      <map:part src="cocoon:/build-info"/>
+      <map:part src="cocoon:/{1}/tab-{2}.html"/>
+      <map:part src="cocoon:/{1}/menu-{2}.html"/>
+      <map:part src="cocoon:/{1}/body-{2}.html"/>
+    </map:aggregate>
+    <map:call resource="skinit">
+      <map:parameter name="type" value="site2xhtml"/>
+      <map:parameter name="path" value="{0}"/>
+    </map:call>
+  </map:match>
+
+      <map:match type="regexp" pattern="^.+$">
+        <map:select type="exists">
+          <map:when test="{project:content.xdocs}/{0}">
+            <map:mount uri-prefix="" src="raw.xmap" check-reload="yes" />
+          </map:when>
+        </map:select>
+      </map:match>
+
+      <!-- generate faq.fo specially  -->
+      <map:match pattern="**faq.fo">
+        <map:mount uri-prefix="" src="faq.xmap" check-reload="yes" />
+      </map:match>
+
+      <!-- generate .fo from .xml  -->
+      <map:match type="regexp" pattern="^(.*?)([^/]*).fo$">
+        <map:select type="exists">
+          <map:when test="{project:content.xdocs}{1}{2}.fo">
+            <map:generate src="{project:content.xdocs}{1}{2}.fo"/>
+          </map:when>
+          <map:otherwise>
+            <map:aggregate element="site">
+              <map:part src="cocoon:/skinconf.xml"/>
+              <map:part src="cocoon:/{1}{2}.xml"/>
+            </map:aggregate>
+            <!-- <map:transform type="idgen"/> -->
+            <map:transform type="xinclude"/>
+            <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.fo"/>
+            <map:select type="exists">
+              <map:when test="{project:skins-dir}{forrest:skin}/xslt/fo/document2fo.xsl">
+                <map:transform src="{project:skins-dir}{forrest:skin}/xslt/fo/document2fo.xsl">
+                  <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+                  <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+                </map:transform>
+              </map:when>
+              <map:when test="{forrest:context}/skins/{forrest:skin}/xslt/fo/document2fo.xsl">
+                <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/fo/document2fo.xsl">
+                  <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+                  <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+                </map:transform>
+              </map:when>
+              <map:otherwise>
+                <map:transform src="{forrest:context}/skins/common/xslt/fo/document2fo.xsl">
+                  <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+                  <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+                </map:transform>
+              </map:otherwise>
+            </map:select>
+        </map:otherwise>
+      </map:select>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match type="regexp" pattern="^(.*?)([^/]*).svg$">
+        <map:generate src="cocoon:/{1}{2}.xml"/>
+        <!-- <map:transform type="idgen"/> -->
+        <map:transform type="xinclude"/>
+        <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.svg"/>
+        <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
+        <map:select type="exists">
+          <map:when test="{project:skins-dir}{forrest:skin}/xslt/svg/document2svg.xsl">
+            <map:transform src="{project:skins-dir}{forrest:skin}/xslt/svg/document2svg.xsl">
+              <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+              <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+            </map:transform>
+          </map:when>
+          <map:when test="{forrest:context}/skins/{forrest:skin}/xslt/svg/document2svg.xsl">
+            <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/svg/document2svg.xsl">
+              <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+              <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+            </map:transform>
+          </map:when>
+          <map:otherwise>
+            <map:transform src="{forrest:context}/skins/common/xslt/svg/document2svg.xsl">
+              <map:parameter name="imagesdir" value="{project:resources.images}/"/>
+              <map:parameter name="xmlbasedir" value="{project:content.xdocs}{1}"/>
+            </map:transform>
+          </map:otherwise>
+        </map:select>
+        <map:serialize type="svgxml"/>
+      </map:match>
+      
+      <map:match pattern="**changes.rss">
+        <map:mount uri-prefix="" src="status.xmap" check-reload="yes" />
+      </map:match>
+
+      <map:match pattern="profiler">
+        <map:mount uri-prefix="" src="profiler.xmap" check-reload="yes" />
+      </map:match>
+
+      <map:match pattern="**.lucene">
+        <map:mount uri-prefix="" src="search.xmap" check-reload="yes" />
+      </map:match>
+
+      <map:select type="exists">
+         <map:when test="{project:temp-dir}/resources.xmap">
+           <map:mount uri-prefix=""
+                      src="{project:temp-dir}/resources.xmap" 
+                      check-reload="yes" 
+                      pass-through="true"/>
+        </map:when>
+      </map:select>
+      
+      <map:match pattern="**.js">
+        <map:mount uri-prefix="" src="resources.xmap" check-reload="yes" />
+      </map:match>
+      <map:match pattern="**.css">
+        <map:mount uri-prefix="" src="resources.xmap" check-reload="yes" />
+      </map:match>
+      <map:match pattern="**images**">
+        <map:mount uri-prefix="" src="resources.xmap" check-reload="yes" />
+      </map:match>
+      <map:match pattern="**.png">
+        <map:mount uri-prefix="" src="resources.xmap" check-reload="yes" />
+      </map:match>
+     <map:match pattern="**.ico">
+        <map:mount uri-prefix="" src="resources.xmap" check-reload="yes" />
+      </map:match>
+    </map:pipeline>
+
+
+
+    <!-- ============================================================ -->
+    <!-- REDIRECTS                                                    -->
+    <!-- ============================================================ -->
+    <map:pipeline internal-only="false">
+
+      <map:match pattern="">
+        <map:redirect-to uri="index.html" />
+      </map:match>
+      <map:match type="regexp" pattern="^.+/$">
+          <map:redirect-to uri="index.html"/>
+      </map:match>
+    </map:pipeline>
+
+  </map:pipelines>
+</map:sitemap>
+]]></pre>
+</body>
+</html>

Propchange: forrest/trunk/docs-author/content/xdocs/howto/sitemap.xmap.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: forrest/trunk/docs-author/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/docs-author/content/xdocs/site.xml?view=diff&r1=158887&r2=158888
==============================================================================
--- forrest/trunk/docs-author/content/xdocs/site.xml (original)
+++ forrest/trunk/docs-author/content/xdocs/site.xml Wed Mar 23 22:53:03 2005
@@ -106,6 +106,8 @@
   <howto label="How-To" href="howto/" tab="howto">
     <overview label="Overview" href="index.html"/>
     <write-howto label="Write a How-to" href="howto-howto.html"/>
+    <understand-pipelines label="Understand pipelines" href="howto-understand-pipelines.html"/>
+    <custom-html-source label="Custom html source" href="howto-custom-html-source.html"/>
     <asf-mirror label="Download mirror" href="howto-asf-mirror.html"/>
     <pdf-tab label="Create tab PDF" href="howto-pdf-tab.html"/>
     <editcss label="Edit CSS (WYSIWYG)" href="howto-editcss.html"/>

Modified: forrest/trunk/docs-author/status.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/docs-author/status.xml?view=diff&r1=158887&r2=158888
==============================================================================
--- forrest/trunk/docs-author/status.xml (original)
+++ forrest/trunk/docs-author/status.xml Wed Mar 23 22:53:03 2005
@@ -51,6 +51,13 @@
         Added document to facilitate
         <link href="site:upgrading_07">upgrading to v0.7</link>
       </action>
+      <action dev="DC" type="add" context="docs"
+        fixes-bug="FOR-446" due-to="Ferdinand Soethe">
+      Added <link href="site:howto/understand-pipelines">How to understand
+      html processing and sitemap pipelines</link>
+      and <link href="site:howto/custom-html-source">How to customize
+      processing of html source</link>.
+      </action>
       <action dev="DC" type="add" context="core">
         Added rudimentary Message of the Day facility.
         See skinconf.xml from a "seed" site for configuration details.