You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by st...@apache.org on 2002/07/22 19:08:46 UTC

cvs commit: xml-forrest/src/resources/skins/bert/xslt/fo document2fo.xsl

stevenn     2002/07/22 10:08:45

  Modified:    .        build.xml layout.xml
               src/documentation/content/xdocs book.xml
               src/resources/conf sitemap.xmap
               src/resources/skins/bert/xslt/fo document2fo.xsl
  Log:
  PDF generation draft due to Ross Gardler, ross@wkwyw.net
  
  Revision  Changes    Path
  1.13      +43 -0     xml-forrest/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/build.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- build.xml	22 Jul 2002 14:17:55 -0000	1.12
  +++ build.xml	22 Jul 2002 17:08:45 -0000	1.13
  @@ -538,7 +538,50 @@
   
     </target>
   
  +  <!-- ================================== -->
  +  <!--    Targets for the remote builds   -->
  +  <!-- ================================== -->
  +  
  +  <target name="bot.init" depends="init">
  +    <!-- initializes environment to start on bot targets -->
  +    <property name="bot.build.dir" value="${build.dir}/bot"/>
  +    <property name="bot.work.build.xml" value="${bot.build.dir}/work.build.xml"/>
  +    <property name="bot.default.parameters.xml" value="${bot.build.dir}/default.parameters.xml"/>
  +    <property name="bot.forrestbot.xconf" value="forrestbot.xconf" />
  +    <property name="bot.templates.build.xml" value="${xlayout.source.resources.forrestbot.ant.dir}/templates.build.xml" />
  +    <property name="bot.work.builder.xslt" value="${xlayout.source.resources.forrestbot.xslt.dir}/config2work.xsl" />
  +    <property name="bot.default.builder.xslt" value="${xlayout.source.resources.forrestbot.xslt.dir}/config2defaults.xsl" />
  +    <mkdir dir="${bot.build.dir}" />
  +  </target>
   
  +  <target name="bot.conf2build" depends="bot.init" >
  +<!--        builds the different xml files this process needs.  -->
  +  <style in="${bot.forrestbot.xconf}"
  +       out="${bot.work.build.xml}"
  +       style="${bot.work.builder.xslt}"/>
  +    <style in="${bot.forrestbot.xconf}"
  +       out="${bot.default.parameters.xml}"
  +       style="${bot.default.builder.xslt}"/>
  +    <copy todir="${bot.build.dir}" file="${bot.templates.build.xml}"/>
  +  </target>
  +
  +  <target name="bot.run" depends="bot.conf2build, compile" >
  +    <path id="forrest.cp">
  +      <path refid="classpath"/>
  +      <fileset dir="${build.dir}">
  +        <include name="*.jar"/>
  +      </fileset>
  +      <fileset dir="${tools.dir}">
  +        <include name="*/lib/*.jar"/>
  +      </fileset>
  +      <pathelement location="${tools.jar}"/>
  +      <pathelement location="${build.context}/WEB-INF/classes"/>
  +    </path>
  +    <!-- delegates to the generated XML file -->
  +    <ant antfile="${bot.work.build.xml}" target="work" inheritRefs="true"/>
  +  </target>
  +  
  +  
     <!-- =================================================================== -->
     <!-- Import Ant-Centipede init targets - sets up basic build stuff                          -->
     <!-- =================================================================== -->
  
  
  
  1.3       +9 -3      xml-forrest/layout.xml
  
  Index: layout.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/layout.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- layout.xml	7 Jul 2002 09:49:40 -0000	1.2
  +++ layout.xml	22 Jul 2002 17:08:45 -0000	1.3
  @@ -34,13 +34,20 @@
            <java dir="./src/examples/src" />
            <library dir="./src/examples/lib" />
         </examples>
  -      <resources dir="./src/resources"/>
  +      <resources dir="./src/resources">
  +         <forrestbot dir="./src/resources/forrestbot">
  +             <ant dir="./src/resources/forrestbot/ant"/>
  +             <xslt dir="./src/resources/forrestbot/xslt" />
  +         </forrestbot>
  +      </resources>
      </source>
      <build dir="./build">
         <java dir="./build/java" />
         <classes dir="./build/classes" />
         <test dir="./build/testcases" />
  -      <work dir="./build/work" />
  +      <work dir="./build/work">
  +          <bot dir="./build/bot" />
  +      </work>
         <documentation dir="./build/docs">
            <javadocs dir="./build/docs/javadocs" />
            <test dir="./build/docs/tests" />
  @@ -76,4 +83,3 @@
         </bin>
      </distributions>
   </layout>
  -
  
  
  
  1.16      +4 -2      xml-forrest/src/documentation/content/xdocs/book.xml
  
  Index: book.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/documentation/content/xdocs/book.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- book.xml	11 Jul 2002 08:54:54 -0000	1.15
  +++ book.xml	22 Jul 2002 17:08:45 -0000	1.16
  @@ -24,7 +24,8 @@
     </menu>
   
     <menu label="Get Involved">
  -    <menu-item label="Forrest Primer" href="primer.html"/>
  +    <menu-item label="Forrest Primer (HTML)" href="primer.html"/>
  +    <menu-item label="Forrest Primer (PDF)" href="primer.pdf"/>
       <menu-item label="Libre" href="libre-intro.html"/>
       <menu-item label="Contributing" href="contrib.html"/>
       <menu-item label="CVS" href="http://cvs.apache.org/viewcvs/xml-forrest/"/>
  @@ -34,7 +35,8 @@
   
     <menu label="Document Samples">
       <menu-item label="DTD documentation" href="dtd-docs.html"/>
  -    <menu-item label="document-v11" href="document-v11.html"/>
  +    <menu-item label="document-v11 (HTML)" href="document-v11.html"/>
  +    <menu-item label="document-v11 (PDF)" href="document-v11.pdf"/>
       <menu-item label="How-Tos" href="community/howto/index.html"/>
       <menu-item label="xml.apache.org" href="xml-site/index.html"/>
     </menu>
  
  
  
  1.12      +399 -381  xml-forrest/src/resources/conf/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- sitemap.xmap	22 Jul 2002 14:17:56 -0000	1.11
  +++ sitemap.xmap	22 Jul 2002 17:08:45 -0000	1.12
  @@ -1,381 +1,399 @@
  -<?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:generator  name="directory"   src="org.apache.cocoon.generation.DirectoryGenerator" label="content"/>
  -   <map:generator  name="html"        src="org.apache.cocoon.generation.HTMLGenerator" label="content"/>
  -   <map:generator  name="libre"       src="org.outerj.yer.use.cocoon.HierarchyGenerator" label="content"/>
  -   <map:generator  name="nekodtd"     src="org.apache.forrest.components.generator.XNIConfigurableFileGenerator" label="content"/>
  -   <!-- FIXME: Change this once better view handling is implemented -->
  -   <map:generator  name="file-nolabel" src="org.apache.cocoon.generation.FileGenerator"/>
  -  </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="xslt" src="org.apache.cocoon.transformation.TraxTransformer"
  -                        logger="sitemap.transformer.xsltc"
  -                        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: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>
  -     <encoding>ISO-8859-1</encoding>
  -   </map:serializer>
  -
  -   <map:serializer name="xml"    mime-type="text/xml"         src="org.apache.cocoon.serialization.XMLSerializer">
  -     <encoding>ISO-8859-1</encoding>
  -   </map:serializer>
  -   <map:serializer name="links"                               src="org.apache.cocoon.serialization.LinkSerializer">
  -     <encoding>ISO-8859-1</encoding>
  -   </map:serializer>
  -   <map:serializer name="svg2jpeg" mime-type="image/jpeg"     src="org.apache.cocoon.serialization.SVGSerializer">
  -       <parameter name="quality" type="float" value="1.0"/>
  -   </map:serializer>
  -   <map:serializer name="svg2png" mime-type="image/png"       src="org.apache.cocoon.serialization.SVGSerializer"/>
  -  </map:serializers>
  -
  -  <map:matchers default="wildcard">
  -   <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
  -  </map:matchers>
  -<!--
  -  <map:selectors default="skin-parameter">
  -    <map:selector name="request-parameter" logger="sitemap.selector.request-parameter"
  -                 src="org.apache.cocoon.selection.RequestParameterSelector">
  -      <parameter-name>skin</parameter-name>
  -    </map:selector>
  -    <map:selector name="style-parameter" logger="sitemap.selector.request-parameter"
  -                 src="org.apache.cocoon.selection.RequestParameterSelector">
  -      <parameter-name>style</parameter-name>
  -    </map:selector>
  -
  -  </map:selectors>
  --->
  -
  -    <!--
  -     The different pipeline implementations
  -  -->
  -  <map:pipelines default="caching">
  -     <map:pipeline name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
  -     <map:pipeline name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
  -     <!-- The following two can be used for profiling:
  -     <map:pipeline name="profile-caching" src="org.apache.cocoon.components.profiler.ProfilingCachingProcessingPipeline"/>
  -     <map:pipeline name="profile-noncaching" src="org.apache.cocoon.components.profiler.ProfilingNonCachingProcessingPipeline"/>
  -     -->
  -  </map:pipelines>
  -  
  - </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="library/xslt/filterlinks.xsl"/>
  -   <map:serialize type="links"/>
  -  </map:view>
  - </map:views>
  -
  - <map:resources>
  -  <map:resource name="skinit">
  -   <map:transform src="skins/@skin@/xslt/html/{type}.xsl">
  -     <map:parameter name="isfaq" value="{isfaq}"/>
  -     <map:parameter name="resource" value="{resource}"/>
  -   </map:transform>
  -   <map:serialize/>
  -  </map:resource>
  -
  -  <map:resource name="book">
  -    <map:generate src="content/xdocs/{../1}book.xml"/>
  -    <map:call resource="skinit">
  -      <map:parameter name="type" value="book2menu"/>
  -      <map:parameter name="resource" value="{resource}.html"/>
  -    </map:call>
  -  </map:resource>
  -
  -  <map:resource name="skin-read">
  -    <map:read src="skins/@skin@/{path}" mime-type="{mime-type}"/>
  -  </map:resource>
  -
  - </map:resources>
  -
  -<!-- =========================== Pipelines ================================= -->
  -
  - <map:pipelines>
  -
  -  <map:pipeline>
  -
  -   <map:match pattern="">
  -    <map:redirect-to uri="index.html"/>
  -   </map:match>
  -
  -  <map:match pattern="apachestats">
  -    <map:generate type="html"
  -                  src="http://www.apache.org/~rubys/stats/xml.apache.org/">
  -      <map:parameter name="xpath"
  -                     value="/html/body//a[contains(@href,'.xml')]"/>
  -    </map:generate>
  -    <map:serialize type="xml"/>
  -  </map:match>
  -
  -  <map:match pattern="**tab-**.xml">
  -    <map:generate src="content/xdocs/tabs.xml"/>
  -    <map:call resource="skinit">
  -     <map:parameter name="type" value="tab2menu"/>
  -     <map:parameter name="resource" value="{1}"/>
  -    </map:call>
  -  </map:match>
  -
  -  <map:match pattern="**book-**/*.xml">
  -    <map:call resource="book">
  -      <map:parameter name="resource" value="{3}"/>
  -    </map:call>
  -  </map:match>
  -
  -  <map:match pattern="**book-**.xml">
  -    <map:call resource="book">
  -      <map:parameter name="resource" value="{2}"/>
  -    </map:call>
  -  </map:match>
  -
  -  <map:match pattern="body-todo.xml">
  -     <map:generate type="file-nolabel" src="status.xml"/>
  -     <map:transform src="library/xslt/todo2document.xsl" label="content"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -     </map:call>
  -   </map:match>
  -
  -   <map:match pattern="body-changes.xml">
  -     <map:generate type="file-nolabel" src="status.xml"/>
  -     <map:transform src="library/xslt/changes2document.xsl" label="content"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -     </map:call>
  -   </map:match>
  -
  -   <map:match pattern="body-faq.xml">
  -     <map:generate type="file-nolabel" src="content/xdocs/faq.xml"/>
  -     <map:transform src="library/xslt/faq2document.xsl" label="content"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -      <map:parameter name="isfaq" value="true"/>
  -     </map:call>
  -   </map:match>
  -
  -   <!-- index pages for contribution categories -->
  -   <map:match pattern="body-community/*/index.xml">
  -     <map:generate src="content/xdocs/community/{1}/index.xml"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -     </map:call>
  -   </map:match>
  -
  -   <!-- no special transformation, yet, for revision pages -->
  -   <map:match pattern="body-community**revision-*.xml">
  -     <map:generate src="content/xdocs/community{1}revision-{2}.xml"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -     </map:call>
  -   </map:match>
  -
  -   <!-- all contribution docs -->
  -   <map:match pattern="body-community/*/*/**.xml">
  -     <map:aggregate element="all" >
  -       <map:part src="content/xdocs/community/{1}/{2}/{3}.xml"/>
  -       <map:part src="cocoon:/revisions-community/{1}/{2}/{3}" />
  -     </map:aggregate>
  -     <map:transform src="library/xslt/{1}2document.xsl" label="content"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -     </map:call>
  -   </map:match>
  -
  -   <!-- revisions only implemented for community pages -->
  -  <map:match pattern="revisions-community/*/*/**">
  -     <map:generate type="directory" src="content/xdocs/community/{1}/{2}">
  -    <map:parameter name="dateFormat" value="yyyy-MM-dd hh:mm" />
  -   </map:generate>
  -     <map:transform src="library/xslt/directory2revisions.xsl" label="content" >
  -       <map:parameter name="use-request-parameters" value="true"/>
  -       <map:parameter name="page" value="{3}"/>
  -     </map:transform>
  -   <map:serialize type="xml" />
  -   </map:match>
  -
  -   <!-- Generate the "doclist" - list of all documentation
  -     The first match generates each book.xml and adds a new attribute "uri".
  -     The second match aggregates each book.xml into a doclist and
  -     then converts it to a document.
  -   -->
  -   <map:match pattern="doclist/content/xdocs/**book.xml">
  -     <map:generate src="content/xdocs/{1}book.xml"/>
  -     <map:transform src="library/xslt/doclist.xsl">
  -       <map:parameter name="uri" value="{1}"/>
  -     </map:transform>
  -     <map:serialize type="xml"/>
  -   </map:match>
  -   <map:match pattern="body-doclist.xml">
  -     <map:aggregate element="doclist">
  -       <map:part src="cocoon:/doclist/content/xdocs/book.xml"/>
  -       <map:part src="cocoon:/doclist/content/xdocs/community/howto/book.xml"/>
  -     </map:aggregate>
  -     <map:transform src="library/xslt/doclist2document.xsl"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -     </map:call>
  -   </map:match>
  -
  -   <!-- HTML DTD Documentation generation pipeline, makes use of NekoDTD tool -->
  -
  -   <map:match pattern="body-**.dtdx.xml">
  -     <map:generate type="nekodtd" src="resources/schema/dtd/{1}.dtd">
  -       <map:parameter name="config-class" value="org.cyberneko.dtd.DTDConfiguration" />
  -     </map:generate>
  -     <map:transform src="library/xslt/dtdx2flat.xsl"/>
  -     <map:transform src="library/xslt/flat2document.xsl"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -      <map:parameter name="isfaq" value="true"/>
  -     </map:call>
  -   </map:match>
  -
  -   <map:match pattern="body-**.xml">
  -     <map:generate src="content/xdocs/{1}.xml"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -     </map:call>
  -   </map:match>
  -
  -   <map:match pattern="*.html">
  -    <map:aggregate element="site">
  -     <map:part src="cocoon:/book-{1}.xml"/>
  -     <map:part src="cocoon:/tab-{1}.xml"/>
  -     <map:part src="cocoon:/body-{1}.xml" label="content"/>
  -    </map:aggregate>
  -    <map:call resource="skinit">
  -      <map:parameter name="type" value="site2xhtml"/>
  -    </map:call>
  -   </map:match>
  -
  -   <map:match pattern="**/*.html">
  -    <map:aggregate element="site">
  -     <map:part src="cocoon:/{1}/book-{1}/{2}.xml"/>
  -     <map:part src="cocoon:/{1}/tab-{1}/{2}.xml"/>
  -     <map:part src="cocoon:/body-{1}/{2}.xml" label="content"/>
  -    </map:aggregate>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="site2xhtml"/>
  -     </map:call>
  -   </map:match>
  -
  -   <!-- ================  Libre   =========================== -->
  -
  -   <map:match pattern="libre">
  -     <map:generate type="libre" src="content/xdocs" >
  -      <map:parameter name="depth" value="-1" />
  -     </map:generate>
  -     <map:serialize type="xml"/>
  -   </map:match>
  -
  -   <!-- ================  Static  =========================== -->
  -
  -   <map:match pattern="skin/**.js">
  -    <map:call resource="skin-read">
  -      <map:parameter name="path" value="scripts/{1}.js"/>
  -      <map:parameter name="mime-type" value="application/javascript"/>
  -    </map:call>
  -   </map:match>
  -
  -   <map:match pattern="**/skin/**.js">
  -    <map:call resource="skin-read">
  -      <map:parameter name="path" value="scripts/{2}.js"/>
  -      <map:parameter name="mime-type" value="application/javascript"/>
  -    </map:call>
  -   </map:match>
  -
  -   <map:match pattern="**.js">
  -     <map:read src="resources/scripts/{1}.js" mime-type="application/javascript"/>
  -   </map:match>
  -
  -   <map:match pattern="skin/**.css">
  -    <map:call resource="skin-read">
  -      <map:parameter name="path" value="css/{1}.css"/>
  -      <map:parameter name="mime-type" value="text/css"/>
  -    </map:call>
  -   </map:match>
  -
  -   <map:match pattern="**/skin/**.css">
  -    <map:call resource="skin-read">
  -      <map:parameter name="path" value="css/{2}.css"/>
  -      <map:parameter name="mime-type" value="text/css"/>
  -    </map:call>
  -   </map:match>
  -
  -   <map:match pattern="**.css">
  -    <map:read src="resources/css/{1}.css" mime-type="text/css"/>
  -   </map:match>
  -
  -   <map:match pattern="skin/images/**.*">
  -    <map:call resource="skin-read">
  -      <map:parameter name="path" value="images/{1}.{2}"/>
  -      <map:parameter name="mime-type" value="image/{2}"/>
  -    </map:call>
  -   </map:match>
  -
  -   <map:match pattern="**/skin/images/**.*">
  -    <map:call resource="skin-read">
  -      <map:parameter name="path" value="images/{2}.{3}"/>
  -      <map:parameter name="mime-type" value="image/{3}"/>
  -    </map:call>
  -   </map:match>
  -
  -   <!-- DS: handles images local to a contributor directory -->
  -   <map:match pattern="**my-images/**.*">
  -    <map:read src="content/xdocs/{1}my-images/{2}.{3}" mime-type="image/{3}"/>
  -   </map:match>
  -
  -   <map:match pattern="images/**.*">
  -    <map:read src="resources/images/{1}.{2}" mime-type="image/{2}"/>
  -   </map:match>
  -
  -   <map:match pattern="**/images/**.*">
  -    <map:read src="resources/images/{2}.{3}" mime-type="image/{3}"/>
  -   </map:match>
  -
  -
  -   <map:match pattern="**favicon.ico">
  -    <map:call resource="skin-read">
  -      <map:parameter name="path" value="images/favicon.ico"/>
  -      <map:parameter name="mime-type" value="application/ico"/>
  -    </map:call>
  -   </map:match>
  -
  -  </map:pipeline>
  - </map:pipelines>
  -
  -</map:sitemap>
  -
  +<?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:generator  name="directory"   src="org.apache.cocoon.generation.DirectoryGenerator" label="content"/>
  +   <map:generator  name="html"        src="org.apache.cocoon.generation.HTMLGenerator" label="content"/>
  +   <map:generator  name="libre"       src="org.outerj.yer.use.cocoon.HierarchyGenerator" label="content"/>
  +   <map:generator  name="nekodtd"     src="org.apache.forrest.components.generator.XNIConfigurableFileGenerator" label="content"/>
  +   <!-- FIXME: Change this once better view handling is implemented -->
  +   <map:generator  name="file-nolabel" src="org.apache.cocoon.generation.FileGenerator"/>
  +  </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="xslt" src="org.apache.cocoon.transformation.TraxTransformer"
  +                        logger="sitemap.transformer.xsltc"
  +                        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: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>
  +     <encoding>ISO-8859-1</encoding>
  +   </map:serializer>
  +
  +   <map:serializer name="xml"    mime-type="text/xml"         src="org.apache.cocoon.serialization.XMLSerializer">
  +     <encoding>ISO-8859-1</encoding>
  +   </map:serializer>
  +
  +   <map:serializer name="fo2pdf"
  +                src="org.apache.cocoon.serialization.FOPSerializer"
  +                mime-type="application/pdf"/>
  +
  +
  +   <map:serializer name="links"                               src="org.apache.cocoon.serialization.LinkSerializer">
  +     <encoding>ISO-8859-1</encoding>
  +   </map:serializer>
  +   <map:serializer name="svg2jpeg" mime-type="image/jpeg"     src="org.apache.cocoon.serialization.SVGSerializer">
  +       <parameter name="quality" type="float" value="1.0"/>
  +   </map:serializer>
  +   <map:serializer name="svg2png" mime-type="image/png"       src="org.apache.cocoon.serialization.SVGSerializer"/>
  +  </map:serializers>
  +
  +  <map:matchers default="wildcard">
  +   <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
  +  </map:matchers>
  +<!--
  +  <map:selectors default="skin-parameter">
  +    <map:selector name="request-parameter" logger="sitemap.selector.request-parameter"
  +                 src="org.apache.cocoon.selection.RequestParameterSelector">
  +      <parameter-name>skin</parameter-name>
  +    </map:selector>
  +    <map:selector name="style-parameter" logger="sitemap.selector.request-parameter"
  +                 src="org.apache.cocoon.selection.RequestParameterSelector">
  +      <parameter-name>style</parameter-name>
  +    </map:selector>
  +
  +  </map:selectors>
  +-->
  +
  +    <!--
  +     The different pipeline implementations
  +  -->
  +  <map:pipelines default="caching">
  +     <map:pipeline name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
  +     <map:pipeline name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
  +     <!-- The following two can be used for profiling:
  +     <map:pipeline name="profile-caching" src="org.apache.cocoon.components.profiler.ProfilingCachingProcessingPipeline"/>
  +     <map:pipeline name="profile-noncaching" src="org.apache.cocoon.components.profiler.ProfilingNonCachingProcessingPipeline"/>
  +     -->
  +  </map:pipelines>
  +  
  + </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="library/xslt/filterlinks.xsl"/>
  +   <map:serialize type="links"/>
  +  </map:view>
  + </map:views>
  +
  + <map:resources>
  +  <map:resource name="skinit">
  +   <map:transform src="skins/@skin@/xslt/html/{type}.xsl">
  +     <map:parameter name="isfaq" value="{isfaq}"/>
  +     <map:parameter name="resource" value="{resource}"/>
  +   </map:transform>
  +   <map:serialize/>
  +  </map:resource>
  +
  +  <map:resource name="book">
  +    <map:generate src="content/xdocs/{../1}book.xml"/>
  +    <map:call resource="skinit">
  +      <map:parameter name="type" value="book2menu"/>
  +      <map:parameter name="resource" value="{resource}.html"/>
  +    </map:call>
  +  </map:resource>
  +
  +  <map:resource name="skin-read">
  +    <map:read src="skins/@skin@/{path}" mime-type="{mime-type}"/>
  +  </map:resource>
  +
  + </map:resources>
  +
  +<!-- =========================== Pipelines ================================= -->
  +
  + <map:pipelines>
  +
  +  <map:pipeline>
  +
  +   <map:match pattern="">
  +    <map:redirect-to uri="index.html"/>
  +   </map:match>
  +
  +  <map:match pattern="apachestats">
  +    <map:generate type="html"
  +                  src="http://www.apache.org/~rubys/stats/xml.apache.org/">
  +      <map:parameter name="xpath"
  +                     value="/html/body//a[contains(@href,'.xml')]"/>
  +    </map:generate>
  +    <map:serialize type="xml"/>
  +  </map:match>
  +
  +  <map:match pattern="**tab-**.xml">
  +    <map:generate src="content/xdocs/tabs.xml"/>
  +    <map:call resource="skinit">
  +     <map:parameter name="type" value="tab2menu"/>
  +     <map:parameter name="resource" value="{1}"/>
  +    </map:call>
  +  </map:match>
  +
  +  <map:match pattern="**book-**/*.xml">
  +    <map:call resource="book">
  +      <map:parameter name="resource" value="{3}"/>
  +    </map:call>
  +  </map:match>
  +
  +  <map:match pattern="**book-**.xml">
  +    <map:call resource="book">
  +      <map:parameter name="resource" value="{2}"/>
  +    </map:call>
  +  </map:match>
  +
  +  <map:match pattern="body-todo.xml">
  +     <map:generate type="file-nolabel" src="status.xml"/>
  +     <map:transform src="library/xslt/todo2document.xsl" label="content"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +     </map:call>
  +   </map:match>
  +
  +   <map:match pattern="body-changes.xml">
  +     <map:generate type="file-nolabel" src="status.xml"/>
  +     <map:transform src="library/xslt/changes2document.xsl" label="content"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +     </map:call>
  +   </map:match>
  +
  +   <map:match pattern="body-faq.xml">
  +     <map:generate type="file-nolabel" src="content/xdocs/faq.xml"/>
  +     <map:transform src="library/xslt/faq2document.xsl" label="content"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="isfaq" value="true"/>
  +     </map:call>
  +   </map:match>
  +
  +   <!-- index pages for contribution categories -->
  +   <map:match pattern="body-community/*/index.xml">
  +     <map:generate src="content/xdocs/community/{1}/index.xml"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +     </map:call>
  +   </map:match>
  +
  +   <!-- no special transformation, yet, for revision pages -->
  +   <map:match pattern="body-community**revision-*.xml">
  +     <map:generate src="content/xdocs/community{1}revision-{2}.xml"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +     </map:call>
  +   </map:match>
  +
  +   <!-- all contribution docs -->
  +   <map:match pattern="body-community/*/*/**.xml">
  +     <map:aggregate element="all" >
  +       <map:part src="content/xdocs/community/{1}/{2}/{3}.xml"/>
  +       <map:part src="cocoon:/revisions-community/{1}/{2}/{3}" />
  +     </map:aggregate>
  +     <map:transform src="library/xslt/{1}2document.xsl" label="content"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +     </map:call>
  +   </map:match>
  +
  +   <!-- revisions only implemented for community pages -->
  +  <map:match pattern="revisions-community/*/*/**">
  +     <map:generate type="directory" src="content/xdocs/community/{1}/{2}">
  +    <map:parameter name="dateFormat" value="yyyy-MM-dd hh:mm" />
  +   </map:generate>
  +     <map:transform src="library/xslt/directory2revisions.xsl" label="content" >
  +       <map:parameter name="use-request-parameters" value="true"/>
  +       <map:parameter name="page" value="{3}"/>
  +     </map:transform>
  +   <map:serialize type="xml" />
  +   </map:match>
  +
  +   <!-- Generate the "doclist" - list of all documentation
  +     The first match generates each book.xml and adds a new attribute "uri".
  +     The second match aggregates each book.xml into a doclist and
  +     then converts it to a document.
  +   -->
  +   <map:match pattern="doclist/content/xdocs/**book.xml">
  +     <map:generate src="content/xdocs/{1}book.xml"/>
  +     <map:transform src="library/xslt/doclist.xsl">
  +       <map:parameter name="uri" value="{1}"/>
  +     </map:transform>
  +     <map:serialize type="xml"/>
  +   </map:match>
  +   <map:match pattern="body-doclist.xml">
  +     <map:aggregate element="doclist">
  +       <map:part src="cocoon:/doclist/content/xdocs/book.xml"/>
  +       <map:part src="cocoon:/doclist/content/xdocs/community/howto/book.xml"/>
  +     </map:aggregate>
  +     <map:transform src="library/xslt/doclist2document.xsl"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +     </map:call>
  +   </map:match>
  +
  +   <!-- HTML DTD Documentation generation pipeline, makes use of NekoDTD tool -->
  +
  +   <map:match pattern="body-**.dtdx.xml">
  +     <map:generate type="nekodtd" src="resources/schema/dtd/{1}.dtd">
  +       <map:parameter name="config-class" value="org.cyberneko.dtd.DTDConfiguration" />
  +     </map:generate>
  +     <map:transform src="library/xslt/dtdx2flat.xsl"/>
  +     <map:transform src="library/xslt/flat2document.xsl"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="isfaq" value="true"/>
  +     </map:call>
  +   </map:match>
  +
  +   <map:match pattern="body-**.xml">
  +     <map:generate src="content/xdocs/{1}.xml"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +     </map:call>
  +   </map:match>
  +
  +   <map:match pattern="*.html">
  +    <map:aggregate element="site">
  +     <map:part src="cocoon:/book-{1}.xml"/>
  +     <map:part src="cocoon:/tab-{1}.xml"/>
  +     <map:part src="cocoon:/body-{1}.xml" label="content"/>
  +    </map:aggregate>
  +    <map:call resource="skinit">
  +      <map:parameter name="type" value="site2xhtml"/>
  +    </map:call>
  +   </map:match>
  +
  +   <map:match pattern="**/*.html">
  +    <map:aggregate element="site">
  +     <map:part src="cocoon:/{1}/book-{1}/{2}.xml"/>
  +     <map:part src="cocoon:/{1}/tab-{1}/{2}.xml"/>
  +     <map:part src="cocoon:/body-{1}/{2}.xml" label="content"/>
  +    </map:aggregate>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="site2xhtml"/>
  +     </map:call>
  +   </map:match>
  +
  +   <map:match pattern="*.pdf">
  +    <map:generate src="content/xdocs/{1}.xml"/>
  +    <map:transform src="skins/@skin@/xslt/fo/document2fo.xsl"/>
  +    <map:serialize type="fo2pdf"/>
  +   </map:match>
  +
  +   <map:match pattern="**/*.pdf">
  +    <map:generate src="{1}/{2}.xml"/>
  +    <map:transform src="skins/@skin@/xslt/fo/document2fo.xsl"/>
  +    <map:serialize type="fo2pdf"/>
  +   </map:match>
  +
  +   <!-- ================  Libre   =========================== -->
  +
  +   <map:match pattern="libre">
  +     <map:generate type="libre" src="content/xdocs" >
  +      <map:parameter name="depth" value="-1" />
  +     </map:generate>
  +     <map:serialize type="xml"/>
  +   </map:match>
  +
  +   <!-- ================  Static  =========================== -->
  +
  +   <map:match pattern="skin/**.js">
  +    <map:call resource="skin-read">
  +      <map:parameter name="path" value="scripts/{1}.js"/>
  +      <map:parameter name="mime-type" value="application/javascript"/>
  +    </map:call>
  +   </map:match>
  +
  +   <map:match pattern="**/skin/**.js">
  +    <map:call resource="skin-read">
  +      <map:parameter name="path" value="scripts/{2}.js"/>
  +      <map:parameter name="mime-type" value="application/javascript"/>
  +    </map:call>
  +   </map:match>
  +
  +   <map:match pattern="**.js">
  +     <map:read src="resources/scripts/{1}.js" mime-type="application/javascript"/>
  +   </map:match>
  +
  +   <map:match pattern="skin/**.css">
  +    <map:call resource="skin-read">
  +      <map:parameter name="path" value="css/{1}.css"/>
  +      <map:parameter name="mime-type" value="text/css"/>
  +    </map:call>
  +   </map:match>
  +
  +   <map:match pattern="**/skin/**.css">
  +    <map:call resource="skin-read">
  +      <map:parameter name="path" value="css/{2}.css"/>
  +      <map:parameter name="mime-type" value="text/css"/>
  +    </map:call>
  +   </map:match>
  +
  +   <map:match pattern="**.css">
  +    <map:read src="resources/css/{1}.css" mime-type="text/css"/>
  +   </map:match>
  +
  +   <map:match pattern="skin/images/**.*">
  +    <map:call resource="skin-read">
  +      <map:parameter name="path" value="images/{1}.{2}"/>
  +      <map:parameter name="mime-type" value="image/{2}"/>
  +    </map:call>
  +   </map:match>
  +
  +   <map:match pattern="**/skin/images/**.*">
  +    <map:call resource="skin-read">
  +      <map:parameter name="path" value="images/{2}.{3}"/>
  +      <map:parameter name="mime-type" value="image/{3}"/>
  +    </map:call>
  +   </map:match>
  +
  +   <!-- DS: handles images local to a contributor directory -->
  +   <map:match pattern="**my-images/**.*">
  +    <map:read src="content/xdocs/{1}my-images/{2}.{3}" mime-type="image/{3}"/>
  +   </map:match>
  +
  +   <map:match pattern="images/**.*">
  +    <map:read src="resources/images/{1}.{2}" mime-type="image/{2}"/>
  +   </map:match>
  +
  +   <map:match pattern="**/images/**.*">
  +    <map:read src="resources/images/{2}.{3}" mime-type="image/{3}"/>
  +   </map:match>
  +
  +
  +   <map:match pattern="**favicon.ico">
  +    <map:call resource="skin-read">
  +      <map:parameter name="path" value="images/favicon.ico"/>
  +      <map:parameter name="mime-type" value="application/ico"/>
  +    </map:call>
  +   </map:match>
  +
  +  </map:pipeline>
  + </map:pipelines>
  +
  +</map:sitemap>
  +
  
  
  
  1.2       +459 -260  xml-forrest/src/resources/skins/bert/xslt/fo/document2fo.xsl
  
  Index: document2fo.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/bert/xslt/fo/document2fo.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- document2fo.xsl	18 Jun 2002 06:35:13 -0000	1.1
  +++ document2fo.xsl	22 Jul 2002 17:08:45 -0000	1.2
  @@ -5,270 +5,279 @@
                   version="1.0">
   
     <xsl:output method="xml"/>
  -  
  +
     <xsl:template match="/">
       <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  -   
  -    <fo:layout-master-set>
  -        <fo:simple-page-master master-name="title"
  -                               page-height="11in"
  -                               page-width="8.5in"
  -                               margin-top="1in"
  -                               margin-bottom="1in"
  -                               margin-left="1.25in"
  -                               margin-right="1.5in">
  -          <fo:region-before extent=".5in" region-name="title-header"/>
  -          <fo:region-body margin-top="1in" margin-bottom="1in"/>
  -          <fo:region-after extent=".5in" region-name="title-footer"/>
  -        </fo:simple-page-master>
  +      <fo:layout-master-set>
   
  -        <fo:simple-page-master master-name="inside"
  -                               page-height="11in"
  -                               page-width="8.5in"
  -                               margin-top="1in"
  -                               margin-bottom="1in"
  -                               margin-left="1.5in"
  -                               margin-right="1.25in">
  -          <fo:region-before extent=".5in" region-name="inside-header"/>
  -          <fo:region-body margin-top="1in" margin-bottom="1in"/>
  -          <fo:region-after extent=".5in" region-name="inside-footer"/>
  +        <fo:simple-page-master master-name="first-page"
  +          page-height="11in" 
  +          page-width="8.5in"
  +          margin-top="1in" 
  +          margin-bottom="1in" 
  +          margin-left="1.25in" 
  +          margin-right="1in">
  +          <fo:region-body
  +            margin-top="0.5in"
  +            margin-bottom=".5in"/>
  +          <fo:region-after 
  +            region-name="first-footer"
  +            extent=".5in"
  +            display-align="before"/>
           </fo:simple-page-master>
   
           <fo:simple-page-master master-name="even-page"
  -                               page-height="11in" 
  -                               page-width="8.5in"
  -                               margin-top="1in" 
  -                               margin-bottom="1in" 
  -                               margin-left="1.25in" 
  -                               margin-right="1in">
  -          <fo:region-before extent=".5in" region-name="even-header"/>
  -          <fo:region-body margin-top=".5in" margin-bottom=".5in"/>
  -          <fo:region-after extent=".5in" region-name="even-footer"/>
  +          page-height="11in" 
  +          page-width="8.5in"
  +          margin-top="1in" 
  +          margin-bottom="1in" 
  +          margin-left="1.25in" 
  +          margin-right="1in">
  +          <fo:region-before
  +            region-name="even-header"
  +            extent="0.5in"
  +            border-bottom="0.5pt solid"/>
  +          <fo:region-body
  +            margin-top="0.5in"
  +            margin-bottom=".5in"/>
  +          <fo:region-after 
  +            region-name="even-footer"
  +            extent=".5in"
  +            display-align="before"/>
           </fo:simple-page-master>
   
           <fo:simple-page-master master-name="odd-page"
  -                               page-height="11in"
  -                               page-width="8.5in"
  -                               margin-top="1in"
  -                               margin-bottom="1in"
  -                               margin-left="1in"
  -                               margin-right="1.25in">
  -          <fo:region-before extent=".5in" region-name="odd-header"/>
  -          <fo:region-body margin-top=".5in" margin-bottom=".5in"/>
  -          <fo:region-after extent=".5in" region-name="odd-footer"/>
  +          page-height="11in" 
  +          page-width="8.5in"
  +          margin-top="1in" 
  +          margin-bottom="1in" 
  +          margin-left="1.25in" 
  +          margin-right="1in">
  +          <fo:region-before
  +            region-name="odd-header"
  +            extent="0.5in"
  +            border-bottom="0.5pt solid"/>
  +          <fo:region-body
  +            margin-top="0.5in"
  +            margin-bottom=".5in"/>
  +          <fo:region-after 
  +            region-name="odd-footer"
  +            extent=".5in"
  +            display-align="before"/>
           </fo:simple-page-master>
   
  -        <fo:page-sequence-master master-name="chapter">
  +        <fo:page-sequence-master master-name="book">
             <fo:repeatable-page-master-alternatives>
  -            <fo:conditional-page-master-reference master-name="title"
  -                                                  page-position="first"
  -                                                  odd-or-even="odd"/>
  -            <fo:conditional-page-master-reference master-name="odd-page"
  -                                                  odd-or-even="odd"
  -                                                  blank-or-not-blank="not-blank"/>
  -            <fo:conditional-page-master-reference master-name="even-page"
  -                                                  page-position="last"/>
  -            <fo:conditional-page-master-reference master-name="even-page"
  -                                                  odd-or-even="even"/>
  +            <fo:conditional-page-master-reference
  +              page-position="first"
  +              master-reference="first-page"/>
  +            <fo:conditional-page-master-reference
  +              odd-or-even="odd"
  +              master-reference="odd-page"/>
  +            <fo:conditional-page-master-reference
  +              odd-or-even="even"
  +              master-reference="even-page"/>
             </fo:repeatable-page-master-alternatives>
           </fo:page-sequence-master>
         </fo:layout-master-set>
  -
  -      <fo:page-sequence master-name="title">
  -        <xsl:if test="//authors">
  -          <fo:static-content flow-name="title-footer">
  -            <fo:block font-family="serif"
  -                      font-size="16pt"
  -                      font-style="italic"
  -                      text-align="end">
  -              <xsl:for-each select="//authors/person">
  -                <xsl:value-of select="@name"/>
  -              </xsl:for-each>
  -            </fo:block>
  -          </fo:static-content>
  -        </xsl:if>
  -        <fo:flow flow-name="xsl-region-body">
  -          <fo:block font-family="serif"
  -                    font-size="48pt"
  -                    font-weight="bold">
  -            <xsl:value-of select="//title"/>
  -          </fo:block>
  -          <xsl:if test="//subtitle">
  -            <fo:block font-family="serif"
  -                      font-size="24pt"
  -                      border-top-style="solid"
  -                      border-top-width=".5pt"
  -                      space-before="12pt"
  -                      text-align="end">
  -              <xsl:value-of select="//subtitle"/>
  -            </fo:block>
  -          </xsl:if>
  -        </fo:flow>
  +      
  +      <fo:page-sequence master-reference="book">
  +        <xsl:apply-templates/>
         </fo:page-sequence>
  -      <xsl:apply-templates/>
  -      <xsl:call-template name="authors"/>
  +      
       </fo:root>
     </xsl:template>
  -
  +  
     <xsl:template match="document">
  -    <fo:page-sequence force-page-count="end-on-even" master-name="chapter">
  -      <fo:title><xsl:value-of select="header/title"/></fo:title>
  -      <fo:static-content flow-name="even-header">
  -        <fo:block text-align="start"
  -                  line-height="12pt"
  -                  font-style="italic"
  -                  font-family="serif"
  -                  font-size="10pt"
  -                  border-after-style="solid"
  -                  border-after-width=".5pt">
  -          <xsl:value-of select="header/title"/>
  -        </fo:block>
  -      </fo:static-content>
  -      <fo:static-content flow-name="even-footer">
  -        <fo:block text-align="start"
  -                  line-height="12pt"
  -                  border-before-style="solid"
  -                  border-before-width=".5pt"
  -                  font-family="serif"
  -                  font-size="10pt"><fo:page-number/></fo:block>
  -      </fo:static-content>
  -      <fo:static-content flow-name="odd-header">
  -        <fo:block text-align="end"
  -                  line-height="12pt"
  -                  font-style="italic"
  -                  font-family="serif"
  -                  font-size="10pt"
  -                  border-after-style="solid"
  -                  border-after-width=".5pt">
  -          <xsl:value-of select="title"/>
  -        </fo:block>
  -      </fo:static-content>
  -      <fo:static-content flow-name="odd-footer">
  -        <fo:block text-align="end"
  -                  line-height="12pt"
  -                  border-before-style="solid"
  -                  border-before-width=".5pt"
  -                  font-family="serif"
  -                  font-size="10pt"><fo:page-number/></fo:block>
  -      </fo:static-content>
  -      <fo:static-content flow-name="title-footer">
  -        <fo:block text-align="end"
  -                  line-height="12pt"
  -                  border-before-style="solid"
  -                  border-before-width=".5pt"
  -                  font-family="serif"
  -                  font-size="10pt"><fo:page-number/></fo:block>
  -      </fo:static-content>
  -      <fo:flow flow-name="xsl-region-body">
  -        <fo:block space-before="2in" font-family="serif" font-size="24pt" font-weight="bold">
  -          <xsl:value-of select="title"/>
  -        </fo:block>
  -        <xsl:if test="header/subtitle">
  -          <fo:block font-style="italic"
  -                    font-family="serif"
  -                    font-size="18pt"
  -                    space-after="10pt">
  -            <xsl:value-of select="header/subtitle"/>
  -          </fo:block>
  -        </xsl:if>
  -        <xsl:apply-templates/>
  -        <xsl:apply-templates select="//authors"/>
  -      </fo:flow>
  -    </fo:page-sequence>
  -  </xsl:template>
  +    <fo:title><xsl:value-of select="header/title"/></fo:title>
  +    
  +    <fo:static-content flow-name="first-footer">
  +      <fo:block
  +        border-top="0.25pt solid"
  +        padding-before="6pt"
  +        text-align="center">
  +        <xsl:apply-templates select="footer"/>
  +      </fo:block>
  +      <fo:block
  +        text-align="start">
  +        Page <fo:page-number/>
  +      </fo:block>
  +    </fo:static-content>
   
  -  <xsl:template match="header">
  -    <fo:page-sequence master-name="inside">
  -      <fo:flow flow-name="xsl-region-body">
  -        <fo:block font-weight="bold" font-size="14pt">
  -          <xsl:value-of select="title"/>
  -        </fo:block>
  -        <xsl:if test="subtitle">
  -          <fo:block font-weight="bold" font-size="10pt">
  -            <xsl:value-of select="subtitle"/>
  -          </fo:block>
  -        </xsl:if>
  -        <xsl:if test="authors">
  -          <fo:block font-size="10pt">
  -            <xsl:text>by </xsl:text>
  -            <xsl:for-each select="authors/person">
  -              <xsl:if test="not(position()=1)">
  -                <xsl:text>, </xsl:text>
  -              </xsl:if>
  -              <xsl:value-of select="name"/>
  -            </xsl:for-each>
  -          </fo:block>
  -        </xsl:if>
  -        <xsl:apply-templates select="abstract"/>
  -      </fo:flow>
  -    </fo:page-sequence>
  -  </xsl:template>
  +    <fo:static-content flow-name="even-header">
  +      <fo:block
  +        text-align="end"
  +        font-style="italic">
  +        <xsl:value-of select="header/title"/>
  +      </fo:block>
  +    </fo:static-content>
   
  +    <fo:static-content flow-name="even-footer">
  +      <fo:block
  +        border-top="0.25pt solid"
  +        padding-before="6pt"
  +        text-align="center">
  +        <xsl:apply-templates select="footer"/>
  +      </fo:block>
  +      <fo:block
  +        text-align="end">
  +        Page <fo:page-number/>
  +      </fo:block>
  +    </fo:static-content>
  +
  +    <fo:static-content flow-name="odd-header">
  +      <fo:block
  +        text-align="start"
  +        font-style="italic">
  +        <xsl:value-of select="header/title"/>
  +      </fo:block>
  +    </fo:static-content>
  +    
  +    <fo:static-content flow-name="odd-footer">
  +      <fo:block
  +        border-top="0.25pt solid"
  +        padding-before="6pt"
  +        text-align="center">
  +        <xsl:apply-templates select="footer"/>
  +      </fo:block>
  +      <fo:block
  +        text-align="start">
  +        Page <fo:page-number/>
  +      </fo:block>
  +    </fo:static-content>
  +
  +    <fo:flow flow-name="xsl-region-body">
  +      <fo:block
  +        padding-before="24pt"
  +        padding-after="24pt"
  +        font-size="24pt"
  +        font-weight="bold">
  +        <xsl:value-of select="header/title"/>
  +      </fo:block>
  +      
  +      <fo:block
  +        text-align="justify"
  +        padding-before="18pt"
  +        padding-after="18pt">
  +        <xsl:apply-templates/>
  +      </fo:block>
  +    </fo:flow>
  +  </xsl:template>
  +  
     <xsl:template match="abstract">
  -    <fo:block font-size="8pt"
  -              text-align="justify"
  -              space-before="20pt"
  -              width="7.5in"
  -              font-family="serif">
  +    <fo:block
  +      font-size="12pt"
  +      text-align="center"
  +      space-before="20pt"
  +      space-after="25pt"
  +      width="7.5in"
  +      font-family="serif"
  +      font-style="italic">
         <xsl:apply-templates/>
       </fo:block>
     </xsl:template>
  +  
  +  <xsl:template match="notice">
  +    <fo:block
  +      font-size="10pt"
  +      text-align="left"
  +      space-before="20pt"
  +      width="7.5in"
  +      font-family="serif"
  +      border-top="0.25pt solid"
  +      border-bottom="0.25pt solid"
  +      padding-before="6pt"
  +      padding-after="6pt">
  +      NOTICE: <xsl:apply-templates/>
  +    </fo:block>
  +  </xsl:template>
   
     <xsl:template match="section">
  +    
       <xsl:param name="level">0</xsl:param>
       <xsl:variable name="size" select="16-(number($level)*2)"/>
  -
  -    <fo:block font-family="serif"
  -              font-size="{$size}pt"
  -              font-weight="bold"
  -              space-before="12pt">
  +    
  +    <fo:block
  +      font-family="serif"
  +      font-size="{$size}pt"
  +      font-weight="bold"
  +      space-before="12pt">
  +      <xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
  +      <xsl:text> </xsl:text>
         <xsl:value-of select="title"/>
       </fo:block>
       <xsl:apply-templates>
         <xsl:with-param name="level" select="number($level)+1"/>
       </xsl:apply-templates>
  +    
  +  </xsl:template>
  +  
  +  <xsl:template match="title">
  +    <!-- do nothing as titles are handled in their parent templates -->
  +  </xsl:template>
  +  
  +  <xsl:template match="subtitle">
  +    <xsl:param name="level">0</xsl:param>
  +    <xsl:variable name="size" select="16-(number($level)*1.5)"/>
  +
  +    <fo:block
  +      font-weight="bold"
  +      font-size="{$size}pt">
  +      <xsl:apply-templates/>
  +    </fo:block>
     </xsl:template>
   
     <xsl:template match="p">
  -    <fo:block space-after="8pt"
  -              font-family="serif"><xsl:apply-templates/></fo:block>
  +    <fo:block
  +      space-before="4pt"
  +      space-after="4pt"
  +      font-family="serif">
  +      <xsl:apply-templates/>
  +    </fo:block>
     </xsl:template>
  +  
   
     <xsl:template match="source">
  -    <fo:block font-family="monospace"
  -              font-size="10pt"
  -              background-color="#f0f0f0"
  -              white-space-collapse="false"
  -              keep-together="always">
  -       <xsl:apply-templates/>
  +    <fo:block
  +      font-family="monospace"
  +      font-size="10pt"
  +      background-color="#f0f0f0"
  +      white-space-collapse="false"
  +      text-align="start">
  +      <xsl:apply-templates/>
       </fo:block>
     </xsl:template>
  -
  +  
  +  
     <xsl:template match="ol|ul">
  -    <fo:list-block provisional-distance-between-starts="9mm"
  -                   provisional-label-separation="3mm">
  +    <fo:list-block 
  +      provisional-distance-between-starts="18pt"
  +      provisional-label-separation="3pt"
  +      text-align="start">
         <xsl:apply-templates/>
       </fo:list-block>
     </xsl:template>
  -
  +  
     <xsl:template match="ol/li">
       <fo:list-item>
  -      <fo:list-item-label start-indent="50%" end-indent="label-end()">
  +      <fo:list-item-label 
  +        end-indent="label-end()">
           <fo:block>
             <xsl:number format="1."/>
           </fo:block>
         </fo:list-item-label>
  -      <fo:list-item-body start-indent="body-start()">
  +      <fo:list-item-body 
  +        start-indent="body-start()">
           <fo:block>
             <xsl:apply-templates/>
           </fo:block>
         </fo:list-item-body>
       </fo:list-item>
     </xsl:template>
  -
  +  
     <xsl:template match="ul/li">
       <fo:list-item>
  -      <fo:list-item-label start-indent="50%" end-indent="label-end()">
  +      <fo:list-item-label end-indent="label-end()">
           <fo:block>&#x2022;</fo:block>
         </fo:list-item-label>
         <fo:list-item-body start-indent="body-start()">
  @@ -278,11 +287,47 @@
         </fo:list-item-body>
       </fo:list-item>
     </xsl:template>
  -
  +  
  +  <xsl:template match="dl">
  +    <fo:list-block
  +      provisional-distance-between-starts="18pt"
  +      provisional-label-separation="3pt"
  +      text-align="start">
  +      <xsl:apply-templates/>
  +    </fo:list-block>
  +  </xsl:template>
  +  
  +  <xsl:template match="dt">
  +    <fo:list-item>
  +      <fo:list-item-label end-indent="label-end()">
  +        <fo:block></fo:block>
  +      </fo:list-item-label>
  +      <fo:list-item-body start-indent="body-start()">
  +        <fo:block
  +          font-weight="bold">
  +          <xsl:apply-templates/>
  +        </fo:block>
  +      </fo:list-item-body>
  +    </fo:list-item>
  +  </xsl:template>
  +  
  +  <xsl:template match="dd">
  +    <fo:list-item>
  +      <fo:list-item-label end-indent="label-end()">
  +        <fo:block></fo:block>
  +      </fo:list-item-label>
  +      <fo:list-item-body start-indent="body-start()">
  +        <fo:block>
  +          <xsl:apply-templates/>
  +        </fo:block>
  +      </fo:list-item-body>
  +    </fo:list-item>
  +  </xsl:template>
  +  
     <xsl:template match="strong">
       <fo:inline font-weight="bold"><xsl:apply-templates/></fo:inline>
     </xsl:template>
  -
  +  
     <xsl:template match="em">
       <fo:inline font-style="italic"><xsl:apply-templates/></fo:inline>
     </xsl:template>
  @@ -292,87 +337,241 @@
     </xsl:template>
   
     <xsl:template match="warning">
  -    <fo:block margin-left="1in"
  -              margin-right="1in"
  -              font-weight="bold"
  -              font-size="10pt"
  -              font-family="serif"
  -              space-before="10pt"
  -              border-before-style="solid"
  -              border-start-style="solid"
  -              border-end-style="solid"
  -              background-color="#800000"
  -              color="#ffffff">
  +    <fo:block
  +      margin-left="0.25in"
  +      margin-right="0.25in"
  +      font-weight="bold"
  +      font-size="10pt"
  +      font-family="serif"
  +      space-before="10pt"
  +      border-before-style="solid"
  +      border-start-style="solid"
  +      border-end-style="solid"
  +      border-color="#D00000"
  +      background-color="#D00000"
  +      color="#ffffff">
         Warning: <xsl:value-of select="title"/>
       </fo:block>
  -    <fo:block margin-left="1in"
  -              margin-right="1in"
  -              font-family="serif"
  -              font-size="8pt"
  -              border-after-style="solid"
  -              border-start-style="solid"
  -              border-end-style="solid"
  -              background-color="#f0f0f0"
  -              padding-start="3pt"
  -              padding-end="3pt"
  -              padding-before="3pt"
  -              padding-after="3pt">
  +    <fo:block
  +      margin-left="0.25in"
  +      margin-right="0.25in"
  +      font-family="serif"
  +      font-size="8pt"
  +      border-after-style="solid"
  +      border-start-style="solid"
  +      border-end-style="solid"
  +      border-color="#D00000"
  +      background-color="#fff0f0"
  +      padding-start="3pt"
  +      padding-end="3pt"
  +      padding-before="3pt"
  +      padding-after="3pt"
  +      space-after="10pt">
         <xsl:apply-templates/>
       </fo:block>
     </xsl:template>
   
  -  <xsl:template match="link">
  -    <fo:basic-link external-destination="{@uri}"><xsl:apply-templates/></fo:basic-link>
  +  <xsl:template match="note">
  +    <fo:block
  +      margin-left="0.25in"
  +      margin-right="0.25in"
  +      font-weight="bold"
  +      font-size="10pt"
  +      color="#ffffff"
  +      font-family="serif"
  +      space-before="10pt"
  +      border-before-style="solid"
  +      border-start-style="solid"
  +      border-end-style="solid"
  +      border-color="#A0C9F5"
  +      background-color="#A0C9F5">
  +      Note: <xsl:value-of select="title"/>
  +    </fo:block>
  +    <fo:block
  +      margin-left="0.25in"
  +      margin-right="0.25in"
  +      font-family="serif"
  +      font-size="8pt"
  +      space-after="10pt"
  +      border-after-style="solid"
  +      border-start-style="solid"
  +      border-end-style="solid"
  +      border-color="#A0C9F5"
  +      background-color="#F0F0FF"
  +      padding-start="3pt"
  +      padding-end="3pt"
  +      padding-before="3pt"
  +      padding-after="3pt">
  +      <xsl:apply-templates/>
  +    </fo:block>
     </xsl:template>
   
  -  <xsl:template match="figure">
  -    <fo:block text-align="center" font-weight="bold" font-family="serif" space-before="10pt" space-after="20pt">
  -      <xsl:value-of select="title"/>
  +  <xsl:template match="fixme">
  +    <fo:block
  +      margin-left="0.25in"
  +      margin-right="0.25in"
  +      font-weight="bold"
  +      font-size="10pt"
  +      color="#FFFFFF"
  +      font-family="serif"
  +      space-before="10pt"
  +      border-before-style="solid"
  +      border-start-style="solid"
  +      border-end-style="solid"
  +      border-color="#C6C650"
  +      background-color="#C6C650">
  +      FIXME (<xsl:value-of select="@author"/>): <xsl:value-of select="title"/>
  +    </fo:block>
  +    <fo:block
  +      margin-left="0.25in"
  +      margin-right="0.25in"
  +      font-family="serif"
  +      font-size="8pt"
  +      space-after="10pt"
  +      border-after-style="solid"
  +      border-start-style="solid"
  +      border-end-style="solid"
  +      border-color="#C6C650"
  +      background-color="#FFF0F0"
  +      padding-start="3pt"
  +      padding-end="3pt"
  +      padding-before="3pt"
  +      padding-after="3pt">
         <xsl:apply-templates/>
       </fo:block>
     </xsl:template>
   
  -  <xsl:template match="graphic">
  -    <fo:external-graphic src="build/documentation/resources/{@fileref}">
  -      <xsl:attribute name="content-type">
  -        <xsl:text>content-type:image/</xsl:text>
  -        <xsl:value-of select="translate(@format,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
  -      </xsl:attribute>
  -    </fo:external-graphic>
  -    <xsl:if test="@srccredit">
  -      <fo:block font-size="8pt" font-family="serif" font-style="italic">
  -        &#x2022; <xsl:value-of select="@srccredit"/>
  -      </fo:block>
  -    </xsl:if>
  +  <xsl:template match="link">
  +    <fo:basic-link external-destination="{@href}"><xsl:apply-templates/></fo:basic-link>
  +  </xsl:template>
  +
  +  <xsl:template match="figure">
  +    <!-- FIXME: Images are not found at the moment -->
  +    <fo:external-graphic src="../resources/{@src}"/>
  +    <!-- alt text and credits need inserting -->
     </xsl:template>
   
     <xsl:template match="table">
  -    <fo:table width="100%" table-layout="fixed">
  -      <xsl:apply-templates/>
  +    <!-- FIXME: Apache FOP must have column widths specified at present,
  +         this section can be removed when this limitation is removed from Fop. 
  +         Unfortunately, this means that each column is a fixed width,
  +         but at least the table displays! -->
  +
  +    <xsl:variable name="max-number-columns">
  +      <xsl:for-each select="tr">
  +        <xsl:sort select="count(td|th)" data-type="number" order="descending"/>
  +        <xsl:if test="position() = 1">
  +          <xsl:value-of select="count(td|th)"/>
  +        </xsl:if>
  +      </xsl:for-each>
  +    </xsl:variable>
  +
  +
  +    <xsl:variable name="column-width">
  +      <xsl:value-of select="6.25 div number($max-number-columns)"/>in
  +    </xsl:variable>
  +
  +    <fo:table>
  +                  
  +      <fo:table-column>
  +        <xsl:attribute name="column-width">
  +          <xsl:value-of select="$column-width"/>
  +        </xsl:attribute>
  +
  +        <xsl:attribute name="number-columns-repeated">
  +          <xsl:value-of select="number($max-number-columns)"/>
  +        </xsl:attribute>
  +      </fo:table-column>
  +
  +      <!-- End of hack for Fop support (if removing this hack, remember 
  +           you need the <fo:table> element) -->
  +
  +      <fo:table-body
  +        font-size="10pt"
  +        font-family="sans-serif">
  +        <xsl:apply-templates select="tr"/>
  +      </fo:table-body>
       </fo:table>
  -  </xsl:template>
   
  -  <xsl:template match="th">
  -    <fo:table-header>
  -      <xsl:apply-templates/>
  -    </fo:table-header>
  +    <!-- FIXME: Apache Fop does not support the caption element yet.
  +         This hack will display the table caption accordingly. -->
  +    <xsl:if test="caption">
  +      <fo:block
  +        text-align="center"
  +        font-weight="bold">
  +        Table
  +        <xsl:text> </xsl:text>
  +        <xsl:number count="table" level="multiple"/>
  +        <xsl:text>: </xsl:text>
  +        <xsl:value-of select="caption"/>
  +      </fo:block>
  +    </xsl:if>
     </xsl:template>
   
     <xsl:template match="tr">
  -    <fo:table-row><xsl:apply-templates/></fo:table-row>
  +    <fo:table-row>
  +      <xsl:apply-templates/>
  +    </fo:table-row>
     </xsl:template>
   
  -  <xsl:template match="tbody">
  -    <fo:table-body>
  -      <xsl:apply-templates/>
  -    </fo:table-body>
  +  <xsl:template match="th">
  +      <fo:table-cell
  +        padding-before="4pt"
  +        padding-after="4pt"
  +        padding-start="4pt"
  +        padding-end="4pt"
  +        background-color="#A0C9F5">
  +        <xsl:attribute name="number-columns-spanned">
  +          <xsl:value-of select="@colspan"/>
  +        </xsl:attribute>
  +        <xsl:attribute name="number-rows-spanned">
  +          <xsl:value-of select="@rowspan"/>
  +        </xsl:attribute>
  +        <fo:block
  +          text-align="center">
  +          <xsl:apply-templates/>
  +        </fo:block>
  +      </fo:table-cell>
     </xsl:template>
   
     <xsl:template match="td">
  -    <fo:table-cell>
  -      <xsl:apply-templates/>
  +    <fo:table-cell
  +      padding-before="4pt"
  +      padding-after="4pt"
  +      padding-start="4pt"
  +      padding-end="4pt"
  +      border="1pt solid #A0C9F5">
  +      <xsl:attribute name="number-columns-spanned">
  +          <xsl:value-of select="@colspan"/>
  +        </xsl:attribute>
  +        <xsl:attribute name="number-rows-spanned">
  +          <xsl:value-of select="@rowspan"/>
  +        </xsl:attribute>
  +      <fo:block>
  +        <xsl:apply-templates/>
  +      </fo:block>
       </fo:table-cell>
     </xsl:template>
   
  +  <xsl:template match="legal">
  +    <fo:inline
  +      font-size="8pt">
  +      <xsl:apply-templates/>
  +    </fo:inline>
  +  </xsl:template>
  +
  +<!-- ====================================================================== -->
  +<!-- Local Extensions section -->
  +<!-- ====================================================================== -->
  +
  + <xsl:template match="citation">
  +   <fo:inline>
  +     [<xsl:value-of select="@def"/>]
  +   </fo:inline>
  + </xsl:template>
  +
  +
  +
   </xsl:stylesheet>
  +