You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2004/07/18 14:11:42 UTC
svn commit: rev 23023 - forrest/trunk/src/documentation/content/xdocs/howto
Author: thorsten
Date: Sun Jul 18 05:11:42 2004
New Revision: 23023
Modified:
forrest/trunk/src/documentation/content/xdocs/howto/pdf-howto.xml
Log:
updated the pdf-howto and added the license
Modified: forrest/trunk/src/documentation/content/xdocs/howto/pdf-howto.xml
==============================================================================
--- forrest/trunk/src/documentation/content/xdocs/howto/pdf-howto.xml (original)
+++ forrest/trunk/src/documentation/content/xdocs/howto/pdf-howto.xml Sun Jul 18 05:11:42 2004
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "document-v12.dtd">
<document>
<header>
@@ -15,50 +30,55 @@
<section>
<title>The way it works...</title>
<p>
- Now let us go into it...
+ You have to define your own sitemap.xmap and create a new foo.xmap based on the aggregate.xmap.
</p>
<ol>
<li>
- Change to the <code>[project]/src/documentation</code> directory.
+ Simply copy the sitemap.xmap that you wish to over-ride, from Forrest sitemaps at ${FORREST_HOME}/src/core/context/sitemap.xmap into your src/documentation directory (or wherever ${project.sitemap-dir} points to).
</li>
<li>
- You have to define your own aggregate.xmap.
- Simply copy the relevant sitemaps that you wish to over-ride, from Forrest sitemaps at forrest/src/core/context/*.xmap into your src/documentation directory (or wherever ${project.sitemap-dir} points to).
- Copy aggregate.xmap to e.g. foo.xmap.
+ Then copy the aggregate.xmap from Forrest sitemaps into your ${project.sitemap-dir} and rename it to foo.xmap.
</li>
<li>
- Edit the file <code>sitemap.xmap</code> and insert the following lines after the <map:match pattern="site.xml">
+ <strong>Edit the file <code>sitemap.xmap</code></strong> - Comment the match for the sitemap like this:
+ <source xml:space="preserve"><![CDATA[
+ <!--map:pipeline internal-only="false">
+ <map:select type="exists">
+ <map:when test="{project:sitemap}">
+ <map:mount uri-prefix="" src="{project:sitemap}" check-reload="yes" />
+ </map:when>
+ </map:select>
+ </map:pipeline-->]]>
+ </source>
+
+ Insert the following lines after the <![CDATA[<map:match pattern="site.xml">]]>
pipeline (around line 194):
- <source xml:space="preserve">
- <![CDATA[
-...
-<map:match pattern="foo.xml">
- <map:mount uri-prefix="" src="foo.xmap" check-reload="yes" />
-</map:match>
+ <source xml:space="preserve"><![CDATA[
...
-]]>
+<map:match pattern="foo.xml">
+ <map:mount uri-prefix="" src="foo.xmap" check-reload="yes" />
+</map:match>
+...]]>
</source>
</li>
<li>
- Edit the file <code>foo.xmap</code>; the <![CDATA[<map:match pattern="*.xml"> ]]>element should look like the
+ Edit the file <code>foo.xmap</code>; the <![CDATA[<map:match pattern="*.xml"> ]]>element should look like the
following:
- <source xml:space="preserve">
- <![CDATA[
-<map:match pattern="*.xml">
- <map:generate src="cocoon://abs-linkmap"/>
- <map:transform type="xpath">
- <map:parameter name="include" value="/*[name()='site']/*[name()='MyFooSite']"/>
- </map:transform>
- <map:transform src="resources/stylesheets/site2book.xsl" />
- <map:transform src="resources/stylesheets/aggregates/book2cinclude.xsl">
- <map:parameter name="title" value="{conf:project-name}: Still My Foo Site"/>
- </map:transform>
- <map:transform type="cinclude"/>
- <map:transform src="resources/stylesheets/aggregates/doc2doc-uniqueids.xsl"/>
- <map:transform src="resources/stylesheets/aggregates/docs2document.xsl"/>
- <map:serialize type="xml"/>
-</map:match>
-]]>
+ <source xml:space="preserve"><![CDATA[
+<map:match pattern="*.xml">
+ <map:generate src="cocoon://abs-linkmap"/>
+ <map:transform type="xpath">
+ <map:parameter name="include" value="/*[name()='site']/*[name()='MyFooSite']"/>
+ </map:transform>
+ <map:transform src="resources/stylesheets/site2book.xsl" />
+ <map:transform src="resources/stylesheets/aggregates/book2cinclude.xsl">
+ <map:parameter name="title" value="{conf:project-name}: Still My Foo Site"/>
+ </map:transform>
+ <map:transform type="cinclude"/>
+ <map:transform src="resources/stylesheets/aggregates/doc2doc-uniqueids.xsl"/>
+ <map:transform src="resources/stylesheets/aggregates/docs2document.xsl"/>
+ <map:serialize type="xml"/>
+</map:match>]]>
</source>
</li>
<li>
@@ -67,50 +87,47 @@
<li>
Line 4 of our example
<br/>
- <code><![CDATA[<map:parameter name="include" value="/*[name()='site']/*[name()='MyFooSite']"/>]]></code>
+ <code><![CDATA[<map:parameter name="include" value="/*[name()='site']/*[name()='MyFooSite']"/>]]></code>
looks at your site.xml and finds something like:
- <source xml:space="preserve">
- <![CDATA[
-...
-<MyFooSite label="Your foo site">
- <firstchapter label="Introduction" href="first.html"/>
- <sec_chapter label="Conclusion" href="second.html/>
-</MyFooSite>
+ <source xml:space="preserve"><![CDATA[
...
-]]>
+<MyFooSite label="Your foo site">
+ <firstchapter label="Introduction" href="first.html"/>
+ <sec_chapter label="Conclusion" href="second.html"/>
+</MyFooSite>
+...]]>
</source>
- So it takes all the elements of <code><![CDATA[<MyFooSite>]]></code> - that means <code><![CDATA[<MyFootSite>]]></code>
+ So it takes all the elements of <code><![CDATA[<MyFooSite>]]></code> - that means <code><![CDATA[<MyFootSite>]]></code>
and its "children" - for the content of the pdf-file to generate.
</li>
<li>
Line 8 defines the title of the pdf-file by taking the content of the project-name variable in
<code>skinconf.xml</code> and adding some funny text:
<br/>
- <code><![CDATA[<map:parameter name="title" value="{conf:project-name}: Still My Foo Site"/>]]></code>
+ <code><![CDATA[<map:parameter name="title" value="{conf:project-name}: Still My Foo Site"/>]]></code>
</li>
</ul>
<note>
In the original <code>aggregate.xmap</code> there is the line
<br/>
- <code><![CDATA[<map:parameter name="ignore" value="{1}"/>]]></code>
+ <code><![CDATA[<map:parameter name="ignore" value="{1}"/>]]></code>
<br/>
- just before the title definition (<code><![CDATA[<map:parameter name="title" value=".../>]]></code>). Be sure to
+ just before the title definition (<code><![CDATA[<map:parameter name="title" value=".../>]]></code>). Be sure to
delete it or comment it out if you like to generate a pdf-file for specific sites. You only need it for
the generation of one pdf-file for the whole project (this is what <code>aggregate.xmap</code> usually does).
</note>
</li>
<li>
In site.xml, add something like
- <source xml:space="preserve">
- <![CDATA[
-<all>
- <whole_foosite href="FooSite.pdf"/>
-</all>
+ <source xml:space="preserve"><![CDATA[
+<all label="Your foo site" >
+ <whole_foosite href="foo.html" label="sub site" />
+</all>
]]>
</source>
- This allows you to link to it via a <code><![CDATA[<link href="site:whole_foosite">]]></code> reference. If you need
- it in the menue entries add the label attribute to the <code><![CDATA[<whole_foosite>]]></code> element:
- <code><![CDATA[<whole_foosite label="My first PDF-file" href="FooSite.pdf"/>]]></code>
+ This allows you to link to it via a <code><![CDATA[<link href="site:whole_foosite">]]></code> reference. If you need
+ it in the menue entries add the label attribute to the <code><![CDATA[<whole_foosite>]]></code> element:
+ <code><![CDATA[<whole_foosite label="My first PDF-file" href="FooSite.pdf"/>]]></code>
</li>
</ol>
<p>