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 2006/02/09 01:26:32 UTC
svn commit: r376128 [5/34] - in /forrest/site: ./ docs_0_60/
docs_0_60/howto/ docs_0_60/howto/bugzilla-patch/ docs_0_60/howto/multi/
docs_0_70/ docs_0_70/howto/ docs_0_70/howto/cvs-ssh/ docs_0_70/howto/multi/
docs_0_80/ docs_0_80/howto/ docs_0_80/howto...
Added: forrest/site/docs_0_60/todo.source.xml
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_60/todo.source.xml?rev=376128&view=auto
==============================================================================
--- forrest/site/docs_0_60/todo.source.xml (added)
+++ forrest/site/docs_0_60/todo.source.xml Wed Feb 8 16:26:20 2006
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><document><header><title>Todo List</title></header><body>
+ <section><title>high</title><ul><li><strong>[code]</strong>
+ <!-- Please leave this action at the top -->
+ Please see our Jira
+ <link href="site:bugs">issue tracker</link> for tasks to be done.
+ Note that the Todo list below is old. We need someone to move those
+ tasks over to the issue tracker.
+ → open</li><li><strong>[code]</strong>
+ Rework the menu generation system to make it more flexible. See thread
+ <link href="http://marc.theaimsgroup.com/?w=2&r=1&s=Fixing+menus&q=t">Fixing
+ menus</link>
+ → open</li><li><strong>[code]</strong>
+ Define an 'object model' for Forrest sites, in the form of a Cocoon
+ pipeline, that defines
+ - The directory structure of a site
+ - Site metadata (what currently lives in skinconf.xml + gump.xml
+ stuff)
+ - Perhaps site.xml metadata for pages?
+
+ This info can then be made public to the sitemap (via XMLFileModule
+ attributes) and the stylesheets (through
+ <code>document(cocoon:/...)</code> calls or inlined with source XML).
+ → open</li><li><strong>[code]</strong>
+ Finalise the project-definition DTDs, like status.xml and module.xml;
+ try to come up with a common format with others on community.at.apache.org.
+ → NKB</li></ul></section>
+
+ <section><title>medium</title><ul><li><strong>[code]</strong>
+ Finish the RSS feed for status.xml.
+ Aggregate status.xml and project.xml to have all needed project data.
+ → NKB</li><li><strong>[docs]</strong>
+ Add stylesheets to render the enhanced status.xml file contents.
+ → open</li><li><strong>[code]</strong>
+ In skinconf.xml, change 'disable-search' to 'enable-search'.
+ → JT</li><li><strong>[code]</strong>
+ Enhance the initial forrest toolbar for Mozilla.
+ See email discussion <link href="http://marc.theaimsgroup.com/?l=forrest-dev&m=102471820523388">draft forrest toolbar for Mozilla</link>.
+ → NKB</li><li><strong>[code]</strong>
+ Fix things so docs can be edited in src/*, and have the changes appear
+ immediately in the webapp. Involves creating/using an InputModule for
+ passing 'forrest.skin' and other properties to the sitemap, so we can
+ avoid the @skin@ hack, and a bit of forrest.build.xml hacking. There
+ are some @tokens@ in a forrest-site CSS file that also need some sort
+ of in-place modification. Perhaps a @token@-to-value Transformer could
+ be the same ${variable}-to-value Transformer mentioned in the RT [3].
+ → open</li><li><strong>[code]</strong>
+ Act on <link href="http://marc.theaimsgroup.com/?t=104099660500001&r=1&w=2">'Entities in XML docs' RT</link>.
+ I can implement Stefano's
+ suggested solution quite easily, but is such limited functionality
+ worth the cost of introducing a proprietary ${variable} syntax? Maybe..
+ Best short-term alternative seems to be using the XNI XInclude
+ processor for pre-validation inclusion.
+ → open</li><li><strong>[docs]</strong>
+ A lot of the info on the website is outdated.
+ → open</li><li><strong>[docs]</strong>
+ Using metadata
+ from site.xml, it would at least be possible to indicate how old the
+ doc is, and perhaps indicate its relevance from a small controlled
+ vocabulary.
+ → open</li><li><strong>[design]</strong>
+ Develop a mechanism for supporting legacy URLs.
+ See email discussion -
+ <link href="http://marc.theaimsgroup.com/?l=forrest-dev&m=102390892524750">redirects with static sites</link>
+ → open</li><li><strong>[code]</strong>
+ Fix up and integrate the Forrest Maven plugin.
+ → open</li></ul></section>
+
+ <section><title>low</title><ul><li><strong>[code]</strong>
+ Ensure that PHP-like stuff can be embedded easily in Forrest files and
+ document it.
+ → open</li><li><strong>[code]</strong>
+ Continue the development of the <link href="site:v0.70//libre-intro">Libre</link> facility - replacement for
+ */book.xml
+ → open</li><li><strong>[docs]</strong>
+ Start a community doc where we list tools such as "code".
+ → open</li><li><strong>[code]</strong>
+ Migrate to a decent schema language, primarily so that we can use
+ namespaces in XML docs, allowing things like XInclude,
+ <link href="http://www.xml.com/pub/a/2002/10/30/rdf-friendly.html">in-line metadata</link>,
+ in-line SVG, Jelly snippets, or anything else users can make a
+ Transformer for.
+ → open</li><li><strong>[code]</strong>
+ Streamline the process of adding support for new schemas. Ideally we'd
+ have an auto-download system, e.g. 'forrest-update docbook' would fetch
+ and install the Docbook DTDs, create catalog entries, sitemap mods etc.
+ → open</li><li><strong>[code]</strong>
+ Make a CSS Generator and a stylesheet to serialize it to text.
+ → NKB</li><li><strong>[docs]</strong>
+ Add a document about authoring in XML for beginners..
+ → open</li></ul></section>
+ </body></document>
\ No newline at end of file
Propchange: forrest/site/docs_0_60/todo.source.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/site/docs_0_60/upgrading_06.source.xml
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_60/upgrading_06.source.xml?rev=376128&view=auto
==============================================================================
--- forrest/site/docs_0_60/upgrading_06.source.xml (added)
+++ forrest/site/docs_0_60/upgrading_06.source.xml Wed Feb 8 16:26:20 2006
@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!--
+ 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 document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://forrest.apache.org/dtd/document-v12.dtd">
+<document>
+ <header>
+ <title>Upgrading to Apache Forrest 0.6</title>
+ </header>
+ <body>
+ <section id="introduction">
+ <title>Introduction</title>
+ <p>
+ This page describes changes to Apache Forrest that affect people who are
+ upgrading to the 0.6 version.
+ If you have other issues, then please discuss on either the
+ <link href="site:mail-lists/forrest-dev">dev</link> or
+ <link href="site:mail-lists/forrest-user">user</link>
+ mailing lists.
+ As more experience is gained, this document will be updated.
+ </p>
+
+ </section>
+
+ <section id="new">
+ <title>New Features</title>
+ <p>
+ The following list shows some of the key new features for Forrest 0.6
+ </p>
+ <ul>
+ <li>Copyless, so now used in place.</li>
+ <li>Project sitemaps take precedence.</li>
+ <li>Now using Subversion (SVN) for source control.</li>
+ <li>New skinconf capabilities and new external skinconf DTD.</li>
+ <li>New skins use CSS instead of tables. Old skins deprecated.</li>
+ <li>Forrestbot.</li>
+ </ul>
+ </section>
+
+ <section id="clean">
+ <title>Run a clean target after upgrade</title>
+ <p>To avoid any issue with old classes being loaded, run a
+ '<code>forrest clean</code>' in your project directory, after you
+ upgraded to this version.
+ </p>
+ </section>
+
+ <section id="sync">
+ <title>General upgrade tips</title>
+ <p>
+ Synchronise your project's skinconf.xml and forrest.properties files.
+ </p>
+ <p>
+ Take advantage of the separation of concerns. In a new workspace,
+ create a fresh
+ '<code>forrest seed</code>' site, then tweak its forrest.properties
+ and skinconf.xml until it reflects your old site.
+ When it is ready, replace your project's skinconf.xml and
+ forrest.properties files.
+ Any remaining issues would concern other aspects of your configuration,
+ such as site.xml and your actual content.
+ </p>
+ </section>
+
+ <section id="home">
+ <title>New location of $FORREST_HOME</title>
+ <p>
+ To use the new Forrest, run 'build.sh' or 'build.bat' as normal,
+ then change the FORREST_HOME environment variable to point to
+ forrest/src/core instead of the old forrest-0.5 location
+ (.../build/dist/shbat). Also make sure PATH gets updated to use the new
+ $FORREST_HOME/bin
+ </p>
+ </section>
+
+ <section id="copyless">
+ <title>Copyless</title>
+ <p>
+ In essence, Forrest does not create a dist anymore, and uses
+ itself in place. No more useless copying to a separate build space,
+ no more backcopying of your changes, all is used live.
+ </p>
+ <p>
+ It improves the build process a lot. Development turnaround time is
+ excellent. You can even tweak the main forrest core stylesheets and
+ see changes immediately.
+ </p>
+ </section>
+
+ <section id="sitemap">
+ <title>Project sitemaps take precedence.</title>
+
+ <p>With Forrest 0.6 it is now possible for projects to "plugin"
+ to our sitemaps, without needing to copy the main sitemaps and keep
+ them synchonised. This will enable hassle-free update to
+ future Forrest versions.</p>
+
+ <p>
+ If your old project did not use any customised <code>*.xmap</code>
+ files, then your upgrade process will be easy (you can safely skip this
+ section).</p>
+
+ <p>If your project did use custom <code>*.xmaps</code>, with matchers for
+ special circumstances (for example special doctypes that you
+ were handling) then you will need to be prepared to make some changes.
+ Hopefully with the new functionality of Forrest, you can do away with
+ your customisations altogether and just use the Forrest default
+ sitemaps. Try that first. If not, then read on...</p>
+
+ <p>Prior to 0.6 it was possible to replace *any* of the xmaps by placing
+ your own versions in your project directory, these were then copied over
+ to replace
+ the Forrest ones at build time. However, with the move to
+ <link href="#copyless">copyless</link> this no longer happens, instead
+ there is now an extension mechanism for the sitemap (as opposed to
+ a replacement mechanism).</p>
+
+ <p>When upgrading to Forrest 0.6 you need to copy customised matchers
+ in any of your projects <code>*.xmap</code> files into your projects
+ <code>sitemap.xmap</code> file. Any matchers in your project
+ <code>*.xmap</code> files that duplicate ones in Forrests own
+ <code>*.xmaps</code> can now be removed. This will ensure that future
+ enhancements to these matchers in Forrest will automatically be included
+ in your project.</p>
+
+ <p>Move your old sitemap out of the way, copy a default one from a fresh
+ 'forrest seed', and add the specific matches that you require.</p>
+
+ <p>The good news is that this process makes upgrading to future versions
+ of Forrest much simpler, because your project <code>*.xmap</code> files will
+ contain only your customisations. As a result there will no longer be a
+ need to merge your custom xmaps with the updated ones in upcoming versions of
+ Forrest.</p>
+
+ <p>See <link href="site:v0.60//project-sitemap">Using project
+ sitemaps</link> for more details.</p>
+
+ </section>
+
+ <section id="skin-config-1">
+ <title>Private skins might need changes to document2html.xsl</title>
+ <p>
+ Moved all references to //skinconfig out of the document2html.xsl
+ into the site2xhtml.xsl file. If you have your own skins that were
+ referencing "$config" or "//skinconfig" in the document2html.xsl
+ then you need to make similar changes.
+ For further information, see Issue
+ <link href="http://issues.apache.org/jira/secure/ViewIssue.jspa?key=FOR-146">FOR-146</link>.
+ </p>
+ </section>
+
+ <section id="skin-config-2">
+ <title>Various additions to skin configuration and new external DTD</title>
+ <p>
+ Various capabilities have been added to the skinconfig.
+ See the new descriptions in the
+ '<code>forrest seed</code>' site
+ <code>src/documentation/skinconf.xml</code> and synchronise yours.
+ </p>
+ <p>For example, to use different colors (e.g. the light blue of the old
+ krysalis skin), CSS colors can be specified in skinconf.xml
+ </p>
+ <p>
+ There is now an external DTD which makes it much easier to keep your
+ skinconf.xml synchronised.
+ </p>
+ </section>
+
+ <section id="antproxy">
+ <title>forrest.antproxy.xml is obsolete in favor of Ant's <import> task</title>
+ <p>
+ Projects that use <code>forrest.antproxy.xml</code> via an Ant build
+ task to invoke Forrest, will receive
+ an error message directing them to this document.
+ Please see the <link href="site:v0.60//your-project/invoking_from_ant">Invoking
+ Forrest from Ant</link> documentation for instructions on how to use
+ the <import> task to integrate Forrest with your build system.
+ </p>
+ </section>
+
+ <section id="ehtml">
+ <title>Deprecation of .ehtml and .ihtml</title>
+ <p>
+ The .ehtml input file format has been deprecated and will likely be
+ removed in the next release.
+ Please convert all .ehtml files to .html files.
+ If you do '<code>forrest seed</code>' there is a sample html source file.
+ </p>
+ </section>
+
+ <section id="jspwiki">
+ <title>Deprecation of .cwiki filename extension to become .jspwiki</title>
+ <p>
+ Use the .jspwiki filename extension rather than old .cwiki extension.
+ Clarifies that the purpose is the JSPWiki source format.
+ </p>
+ </section>
+
+ <section id="forrestbot">
+ <title>New forrestbot</title>
+ <p>
+ The forrestbot and the forrestbot web interface have been completely
+ rewritten. There is no
+ direct way to convert old configurations to new configurations.
+ Please see the <link href="site:forrestbot">forrestbot
+ documentation</link> for instructions to create buildfiles that work
+ with the new forrestbot.
+ </p>
+ </section>
+
+ <section id="dtd">
+ <title>New DTDs</title>
+ <p>
+ Updated all v1.2 DTDs to become v1.3 DTDs (forward compatibility:
+ v1.2 docs will work fine as V1.3). The main change is the addition
+ of a @class attribute to every element, which enables the "extra-css"
+ section in the skinconf to be put to good use.
+ </p>
+ <p>
+ Updated the v2.0a DTDs to become v2.0 DTDs (forward incompatibility:
+ v1.2/1.3 docs are not forward-compatible as V2.0).
+ </p>
+ <source xml:space="preserve"><![CDATA[
+Changes from V1.2 to V1.3
+=========================
+document - Addition of class attribute all elements
+faq - Addition of class attribute all elements
+changes - Addition of class attribute all elements
+howto - Addition of class attribute all elements
+todo - Addition of class attribute all elements
+
+Changes from V2.0a to V2.0
+==========================
+document - Addition of class attribute, all elements
+ - Addition of label attribute to note and
+ warning elements (consistent with v1.2/1.3)
+faq - Class attribute, all elements
+changes - New DTD
+howto - New DTD
+todo - New DTD
+
+Changes from V1.3 to V2.0
+=========================
+document - Renamed <link> to <a>
+ - Removed <fork> and <jump>.
+faq - Renamed <part> to <faqsection>
+ - @title attribute on <faqs> is now a nested
+ <title> element
+ - Same changes as in document between 1.3 and 2.0
+changes - Same changes as in document between 1.3 and 2.0
+howto - Same changes as in document between 1.3 and 2.0
+todo - Same changes as in document between 1.3 and 2.0
+]]></source>
+ </section>
+
+ <section id="catalog">
+ <title>SystemIdentifiers for DTDs changed to forrest.apache.org</title>
+ <p>
+ Everyone should still continue to use the
+ <link href="site:v0.60//catalog">Catalog Entity Resolver</link>
+ and that certainly still operates at the core of Forrest using the
+ well-defined PublicIdentifiers.
+ However, some impoverished XML tools do not, so they need to be able
+ to get the DTDs from the website. Some other tools rely on the System
+ Identifier rather than the Public Identifer. See Forrest Issue
+ <link href="http://issues.apache.org/jira/secure/ViewIssue.jspa?key=FOR-107">FOR-107</link>.
+ </p>
+ <p>
+ In previous versions of Forrest, and maybe in your application if
+ you copied the fresh-site xdocs, there were inconsistent
+ SystemIdentifiers. Some used local filenames, others used
+ apache.org/forrest/dtd/ URIs. In v0.6 we changed to use
+ System Identifiers at forrest.apache.org/dtd/ as resource URLs.
+ You do not need to change them because you are using the entity
+ resolver, but to remain consistent, it probably is best.
+ </p>
+ <p>
+ Beware if you have a catalog where the mapping is not declared properly.
+ The Catalog Entity Resolver will miss the local mapping and happily
+ go to the network to get the DTDs. That would cause Forrest to appear
+ to be slow for you, yet it will still operate properly. While we are
+ on that topic, if you use the XSLT document() function - there is a
+ <link href="http://issues.apache.org/bugzilla/show_bug.cgi?id=28341">Xalan bug 28341</link>
+ for DTD resolution via document() - please help to fix it.
+ Also see the
+ <link href="http://cocoon.apache.org/2.1/faq/faq-xslt.html">Cocoon FAQ</link>.
+ </p>
+ </section>
+
+ <section id="local-catalog">
+ <title>Projects can use a local CatalogManager.properties</title>
+ <p>
+ You can add a local CatalogManager.properties to your
+ project.classes-dir (usually src/documentation/classes/)
+ to define your additional catalogs for DTDs and other entities.
+ Copy a default file from a fresh 'forrest seed site'.
+ </p>
+ <p>
+ If you do not add such a configuration file, then there will be a
+ harmless message on startup "CatalogManager.properties not found".
+ </p>
+ </section>
+
+ <section id="skin-names">
+ <title>Skins renamed and deleted</title>
+ <p>Skins now have a naming convention. The default skins are
+ <link href="skins.html">described</link>.</p>
+ <p>The old skin names are automatically mapped to the new names. You
+ should change your forrest.properties to use the new names.</p>
+ <p>The following skins were renamed (the old names still work, but may not in future releases).</p>
+ <table>
+ <tr><th colspan="1" rowspan="1">0.5 Name</th><th colspan="1" rowspan="1">0.6 Name</th></tr>
+ <tr><td colspan="1" rowspan="1">krysalis-site</td><td colspan="1" rowspan="1">crust</td></tr>
+ <tr><td colspan="1" rowspan="1">tigris-style</td><td colspan="1" rowspan="1">tigris</td></tr>
+ </table>
+ <p>The following skins were deleted (the old names still work, but may not in future releases).</p>
+ <table>
+ <tr><th colspan="1" rowspan="1">0.5 Name</th><th colspan="1" rowspan="1">0.6 Alias</th></tr>
+ <tr><td colspan="1" rowspan="1">forrest-css</td><td colspan="1" rowspan="1">crust</td></tr>
+ <tr><td colspan="1" rowspan="1">avalon-tigris</td><td colspan="1" rowspan="1">tigris</td></tr>
+ </table>
+ <p>The old "forrest-site" skin is retained for a little while longer,
+ but is deprecated, so please move to one of the other skins.</p>
+ </section>
+
+ <section id="wholesite">
+ <title>Wholesite.html/pdf</title>
+ <p>Instead of using names "site.html/pdf" to create an aggregate page
+ of your entire site, use "wholesite.html/pdf". The old names are still
+ supported for backwards compatibility but they may not be in the
+ future.</p>
+ </section>
+
+ <section>
+ <title>To be continued...</title>
+ <p>...as more issues are discovered/remembered :) Please send feedback
+ to the
+ <link href="site:mail-lists/forrest-dev">mailing list</link>.</p>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Propchange: forrest/site/docs_0_60/upgrading_06.source.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/site/docs_0_60/validation.source.xml
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_60/validation.source.xml?rev=376128&view=auto
==============================================================================
--- forrest/site/docs_0_60/validation.source.xml (added)
+++ forrest/site/docs_0_60/validation.source.xml Wed Feb 8 16:26:20 2006
@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!--
+ 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 document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://forrest.apache.org/dtd/document-v12.dtd">
+<document>
+ <header>
+ <title>XML Validation</title>
+ <subtitle>DTDs, catalogs and whatnot</subtitle>
+ </header>
+
+ <body>
+ <section id="xml_validation">
+ <title>XML validation</title>
+ <p>
+ By default, Forrest will validate your XML before generating
+ HTML or a webapp from it, and fail if any XML files are not valid.
+ Validation can be performed manually by doing
+ '<code>forrest validate</code>' in the project root directory.
+ </p>
+ <p>
+ For an XML file to be valid, it <em>must</em> have a document type
+ declaration at the top, indicating its content type. Hence by
+ default, any Forrest-processed XML file that lacks a DOCTYPE
+ declaration will cause the build to break.
+ </p>
+ <p>
+ Despite the strict default behavior, Forrest is quite flexible about
+ validation. Validation can be switched off for certain sections of a
+ project. In validated sections, it is possible for projects to specify
+ exactly what files they want (and don't want) validated. Forrest
+ validation is controlled through a set of properties in
+ <code>forrest.properties</code>:
+ </p>
+ <source xml:space="preserve">
+##############
+# validation properties
+
+# This set of properties determine if validation is performed
+# Values are inherited unless overridden.
+# e.g. if forrest.validate=false then all others are false unless set to true.
+#forrest.validate=true
+#forrest.validate.xdocs=${forrest.validate}
+#forrest.validate.skinconf=${forrest.validate}
+#forrest.validate.sitemap=${forrest.validate}
+#forrest.validate.stylesheets=${forrest.validate}
+#forrest.validate.skins=${forrest.validate}
+#forrest.validate.skins.stylesheets=${forrest.validate.skins}
+
+# *.failonerror=(true|false) - stop when an XML file is invalid
+#forrest.validate.failonerror=true
+
+# *.excludes=(pattern) - comma-separated list of path patterns to not validate
+# e.g.
+#forrest.validate.xdocs.excludes=samples/subdir/**, samples/faq.xml
+#forrest.validate.xdocs.excludes=
+ </source>
+ <p>
+ For example, to avoid validating
+ <code>${project.xdocs-dir}</code>/slides.xml and everything inside the
+ <code>${project.xdocs-dir}/manual/</code> directory, add this to
+ <code>forrest.properties</code>:
+ </p>
+ <source xml:space="preserve">forrest.validate.xdocs.excludes=slides.xml, manual/**</source>
+ <note>
+ The <code>failonerror</code> properties only work for files validated
+ with Ant's <xmlvalidate> and not (yet) for those validated
+ with <jing>, where <code>failonerror</code> defaults to
+ <code>true</code>.
+ </note>
+ </section>
+
+ <section>
+ <title>Validating new XML types</title>
+ <p>
+ Forrest provides an <link href="ext:catalog_spec">OASIS Catalog</link>
+ [see <link href="ext:catalog_intro">tutorial</link>]
+ <code>forrest/src/core/context/resources/schema/catalog.xcat</code>
+ as a means of associating public identifiers
+ (e.g. <code>-//APACHE//DTD Documentation V1.1//EN</code> above) with DTDs.
+ If you <link href="site:v0.60//new_content_type">add a new content type</link>, you
+ should add the DTD to <code>${project.schema-dir}/dtd/</code> and add
+ an entry to the <code>${project.schema-dir}/catalog.xcat</code> file. This
+ section describes the details of this process.
+ </p>
+
+ <section>
+ <title>Creating or extending a DTD</title>
+ <p>
+ The main Forrest DTDs are designed to be modular and extensible, so
+ it is fairly easy to create a new document type that is a superset
+ of one from Forrest. This is what we'll demonstrate here, using our
+ earlier <link href="site:v0.60//new_content_type">download format</link>
+ as an example. Our download format adds a group of new elements to
+ the standard 'documentv13' format. Our new elements are described
+ by the following DTD:
+ </p>
+ <source xml:space="preserve">
+<!ELEMENT release (downloads)>
+<!ATTLIST release
+version CDATA #REQUIRED
+date CDATA #REQUIRED>
+
+<!ELEMENT downloads (file*)>
+
+<!ELEMENT file EMPTY>
+<!ATTLIST file
+url CDATA #REQUIRED
+name CDATA #REQUIRED
+size CDATA #IMPLIED>
+ </source>
+ <p>
+ The document-v13 entities are defined in a reusable 'module':
+ <code>forrest/src/core/context/resources/schema/dtd/document-v13.mod</code>
+ The
+ <code>forrest/src/core/context/resources/schema/dtd/document-v13.dtd</code>
+ file provides a full description and basic example of how to pull in
+ modules. In our example, our DTD reuses modules
+ <code>common-charents-v10.mod</code> and
+ <code>document-v13.mod</code>. Here is the full DTD, with
+ explanation to follow.
+ </p>
+ <source xml:space="preserve">
+<!-- ===================================================================
+
+Download Doc format
+
+PURPOSE:
+This DTD provides simple extensions on the Apache DocumentV11 format to link
+to a set of downloadable files.
+
+TYPICAL INVOCATION:
+
+<!DOCTYPE document PUBLIC "-//Acme//DTD Download Documentation V1.0//EN"
+"download-v10.dtd">
+
+COPYRIGHT:
+ 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.
+
+==================================================================== -->
+
+
+<!-- =============================================================== -->
+<!-- Include the Common ISO Character Entity Sets -->
+<!-- =============================================================== -->
+
+<!ENTITY % common-charents PUBLIC
+"-//APACHE//ENTITIES Common Character Entity Sets V1.0//EN"
+"common-charents-v10.mod">
+%common-charents;
+
+<!-- =============================================================== -->
+<!-- Document -->
+<!-- =============================================================== -->
+
+<!ENTITY % document PUBLIC "-//APACHE//ENTITIES Documentation V1.3//EN"
+"document-v13.mod">
+
+<!-- Override this entity so that 'release' is allowed below 'section' -->
+<!ENTITY % local.sections "|release">
+
+%document;
+
+<!ELEMENT release (downloads)>
+<!ATTLIST release
+version CDATA #REQUIRED
+date CDATA #REQUIRED>
+
+<!ELEMENT downloads (file*)>
+
+<!ELEMENT file EMPTY>
+<!ATTLIST file
+url CDATA #REQUIRED
+name CDATA #REQUIRED
+size CDATA #IMPLIED>
+
+<!-- =============================================================== -->
+<!-- End of DTD -->
+<!-- =============================================================== -->
+ </source>
+ <p>This custom DTD should be placed in your project resources
+ directory at <code>src/documentation/resources/schema/dtd/</code></p>
+ <p>
+ The <!ENTITY % ... > blocks are so-called
+ <link href="http://www.xml.com/axml/target.html#dt-PERef">parameter
+ entities</link>. They are like macros, whose content will be
+ inserted when a parameter-entity reference, like
+ <code>%common-charents;</code> or <code>%document;</code> is
+ inserted.
+ </p>
+ <p>
+ In our DTD, we first pull in the 'common-charents' entity, which
+ defines character symbol sets. We then define the 'document'
+ entity. However, before the <code>%document;</code> PE reference, we
+ first override the 'local.section' entity. This is a hook into
+ document-v13.mod. By setting its value to '|release', we declare
+ that our <release> element is to be allowed wherever "local
+ sections" are used. There are five or so such hooks for different
+ areas of the document; see document-v13.dtd for more details. We then
+ import the %document; contents, and declare the rest of our DTD
+ elements.
+ </p>
+ <p>
+ We now have a DTD for the 'download' document type.
+ </p>
+ <note>
+ <link href="http://www.oasis-open.org/docbook/documentation/reference/html/ch05.html">Chapter
+ 5: Customizing DocBook</link> of Norman Walsh's "DocBook: The
+ Definitive Guide" gives a complete overview of the process of
+ customizing a DTD.
+ </note>
+ </section>
+
+ <section id="catalog">
+ <title>Associating DTDs with document types</title>
+
+ <p>
+ Recall that our DOCTYPE declaration for our download document type
+ is:
+ </p>
+ <source xml:space="preserve"><!DOCTYPE document PUBLIC "-//Acme//DTD Download Documentation V1.0//EN"
+ "download-v10.dtd">
+ </source>
+ <p>
+ We only care about the quoted section after <code>PUBLIC</code>, called
+ the "public identifier", which globally identifies our document type.
+ We cannot rely on the subsequent "system identifier" part
+ ("download-v10.dtd"), because as a relative reference it is liable to
+ break. The solution Forrest uses is to ignore the system id, and rely
+ on a mapping from the public ID to a stable DTD location, via a
+ Catalog file.</p>
+ <note>
+ See <link href="ext:catalog_intro">this article</link> for a good
+ introduction to catalogs and the Cocoon documentation
+ <link href="ext:cocoon/catalogs">Entity resolution with catalogs</link>.
+ </note>
+ <p>
+ Forrest provides a standard catalog file at
+ <code>forrest/src/core/context/resources/schema/catalog.xcat</code>
+ for the document
+ types that Forrest provides. Projects can augment this with their
+ own catalog file located in
+ <code>${project.schema-dir}/catalog.xcat</code>
+ </p>
+ <p>
+ Forrest uses the XML Catalog syntax by default, although the older
+ plain-text
+ format can also be used. Here is what the XML Catalog format looks
+ like:
+ </p>
+ <source xml:space="preserve"><![CDATA[<?xml version="1.0"?>
+<!-- OASIS XML Catalog for Forrest -->
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+ <public publicId="-//Acme//DTD Download Documentation V1.0//EN"
+ uri="dtd/download-v10.dtd"/>
+</catalog>]]></source>
+ <p>
+ The format is described in <link href="ext:catalog_spec">the
+ spec</link>, and is fairly simple and very powerful.
+ The "<code>public</code>" elements map
+ a public identifier to a DTD (relative to the catalog file).
+ </p>
+ <p>
+ Next specify the full path to your <code>catalog.xcat</code> in the
+ <code>src/documentation/classes/CatalogManager.properties</code> file.
+ Cocoon needs this file when it starts to run. A template file is
+ provided in the "fresh-site" when you do the
+ '<code>forrest seed</code>' to commence a new project.
+ </p>
+ <p>
+ We now have a custom DTD and a catalog mapping which lets both
+ Forrest and Cocoon
+ locate the DTD. Now if we were to run <code>'forrest validate'</code>
+ our download file would validate along with all the others. If
+ something goes wrong, try running <code>'forrest -v validate'</code> to
+ see the error in more detail. Remember to raise the "verbosity"
+ level in <code>cocoon.xconf</code> if you suspect problems
+ with your catalog.
+ </p>
+ </section>
+ </section>
+
+ <section id="entities">
+ <title>Referring to entities</title>
+ <p>
+ Look at the source of this document
+ (<code>xdocs/docs/validation.xml</code>) and see how the entity set
+ <code>"Numeric and Special Graphic"</code> is declared in the
+ document type declaration.
+ </p>
+ <table>
+ <tr>
+ <td colspan="1" rowspan="1">ISOnum.pen</td>
+ <td colspan="1" rowspan="1">&half;</td>
+ <td colspan="1" rowspan="1">½</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Validating in an XML editor</title>
+ <p>
+ If you have an XML editor that understands SGML or XML catalogs, let
+ it know where the Forrest catalog file is, and you will be able to
+ validate any Forrest XML file, regardless of location, as you edit
+ your files. See the
+ <link href="site:v0.60//catalog">configuration notes</link> your favourite
+ editor.
+ </p>
+ </section>
+
+ <section id="relaxng">
+ <title>Validation using RELAX NG</title>
+ <p>
+ Other validation is also conducted during build-time using RELAX NG.
+ This validates all of the important configuration files, both in
+ Forrest itself and in your project. At the moment it processes all
+ skinconf.xml files, all sitemap.xmap files, and all XSLT stylesheets.
+ </p>
+ <p>
+ The RNG grammars to do this are located in the
+ <code>src/core/context/resources/schema/relaxng</code> directory.
+ If you want to
+ know more about this, and perhaps extend it for your own use, then
+ see <code>src/core/context/resources/schema/relaxng/README.txt</code>
+ and the Ant targets in the various build.xml files.
+ </p>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Propchange: forrest/site/docs_0_60/validation.source.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/site/docs_0_60/your-project.source.xml
URL: http://svn.apache.org/viewcvs/forrest/site/docs_0_60/your-project.source.xml?rev=376128&view=auto
==============================================================================
--- forrest/site/docs_0_60/your-project.source.xml (added)
+++ forrest/site/docs_0_60/your-project.source.xml Wed Feb 8 16:26:20 2006
@@ -0,0 +1,1081 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!--
+ 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 document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
+<document>
+ <header>
+ <title>Using Forrest</title>
+ <subtitle>A tutorial on how to use Forrest in your own projects</subtitle>
+ </header>
+
+ <body>
+ <section id="intro">
+ <title>Introduction</title>
+ <p>
+ This tutorial will lead you through the process of installing Forrest, and using
+ it to create a new project, or add Forrest-based docs to an existing project.
+ </p>
+ </section>
+
+ <section id="installing">
+ <title>Installing Forrest</title>
+ <p>
+ <link href="site:about/download">Download</link> the latest release
+ of Forrest, or
+ if you want to try the development version,
+ <link href="site:v0.60//build">build Forrest</link> from source.
+ </p>
+ <p>
+ After downloading and extracting forrest, you need to add environment variables.
+ </p>
+ <p>In Unix/Linux:</p>
+ <source xml:space="preserve">
+~/apache-forrest-0.6$ export FORREST_HOME=`pwd`/src/core
+~/apache-forrest-0.6$ export PATH=$PATH:$FORREST_HOME/bin
+ </source>
+ <p>In Windows:</p>
+ <source xml:space="preserve">
+Go to "My Computer", "Properties", "Advanced", "Environment Variables"
+and add:
+<code>FORREST_HOME</code> as <code>C:\full\path\to\apache-forrest-0.6\src\core</code>
+<code>PATH</code> as <code>%PATH%;%FORREST_HOME%\bin</code>
+ </source>
+ <p>
+ To see what the 'forrest' command can do, type 'forrest -projecthelp'.
+ The build targets that are marked with * are the commonly used ones.
+ </p>
+ <source xml:space="preserve">
+Apache Forrest. Run 'forrest -projecthelp' to list options
+
+Buildfile: /usr/local/svn/forrest/src/core/bin/../forrest.build.xml
+
+ *=======================================================*
+ | Forrest Site Builder |
+ | 0.6-dev |
+ *=======================================================*
+
+ Call this through the 'forrest' command
+
+Main targets:
+
+ available-skins What skins are available?
+ clean * Clean all directories and files generated during
+ the build
+ install-skin Install the needed skin from the remote repository
+ package-skin Make a package of an existing skin
+ run * Run Jetty (instant live webapp)
+ run_custom_jetty Run Jetty with configuration file found in the project
+ run_default_jetty Run Jetty with configuration file found in Forrest
+ seed * Seeds a directory with a template project doc structure
+ site * Generates a static HTML website for this project
+ validate Validate all: xdocs, skins, sitemap, etc
+ validate-sitemap Validate the project sitemaps
+ validate-skinchoice Validate skin choice
+ validate-skinconf Validate skinconf
+ validate-skins Validate skins
+ validate-stylesheets Validate XSL files
+ validate-xdocs Validate the project xdocs
+ war * Generates a dynamic servlet-based website
+ (a packaged .war file)
+ webapp Generates a dynamic servlet-based website
+ (an unpackaged webapp).
+ webapp-local Generates a dynamic servlet-based website
+ (an unpackaged webapp). Note this webapp is suitable
+ for local execution only, use the 'war' or 'webapp'
+ target if you wish to deploy remotely.
+Default target: site
+ </source>
+ <p>
+ As 'site' is the default target, just running 'forrest' without options will
+ generate a "static HTML website". For example, typing 'forrest' in the
+ top-level "forrest" directory would build Forrest's own website.
+ But we're going to be building a new site for your project, so read on.
+ </p>
+ </section>
+
+ <section id="seeding_new">
+ <title>Seeding a new project</title>
+ <p>
+ 'Seeding' a project is our own arborial term for adding a template
+ documentation set to your project, which you can then customize.
+ </p>
+ <p>
+ To try this out, create a completely new directory, change directory
+ to it, and do 'forrest seed':
+ </p>
+ <source xml:space="preserve">
+[/home/me/forrest/my-test]$ forrest seed
+
+Apache Forrest. Run 'forrest -projecthelp' to list options
+
+Buildfile: /usr/local/svn/forrest/src/core/bin/../forrest.build.xml
+
+init-props:
+Loading project specific properties from
+ /home/me/forrest/my-test/forrest.properties
+...
+echo-settings:
+
+check-contentdir:
+
+ensure-nocontent:
+
+seed:
+Copying 41 files to /home/me/forrest/my-test
+
+-------------------------------
+~~ Template project created! ~~
+
+Here is an outline of the generated files:
+
+/ # /home/me/forrest/my-test
+/status.xml # List of project developers, todo list and change log
+/forrest.properties # Optional file describing your site layout
+/src/documentation/ # Doc-specific files
+/src/documentation/skinconf.xml # Info about your project used by the skin
+/src/documentation/content/ # Site content.
+/src/documentation/content/xdocs # XML content.
+/src/documentation/content/xdocs/index.xml # Home page
+/src/documentation/content/xdocs/site.xml # Navigation file for site structure
+/src/documentation/content/xdocs/tabs.xml # Skin-specific 'tabs' file.
+/src/documentation/content/*.html,pdf # Static content files, may have subdirs
+/src/documentation/resources/images # Project images (logos, etc)
+# you can create other directories as needed (see forrest.properties)
+
+
+What to do now?
+
+- Render this template to static HTML by typing 'forrest'.
+ View the generated HTML in a browser to make sure everything works.
+- Alternatively 'forrest run' and browse to http://localhost:8888/ live demo.
+- Edit status.xml and src/documentation/skinconf.xml
+ to customize for your project.
+- Start adding content in xdocs/ remembering to declare new files in site.xml
+- Follow the document http://forrest.apache.org/docs/your-project.html
+- Provide any feedback to dev@forrest.apache.org
+
+Thanks for using Apache Forrest
+-------------------------------
+
+BUILD SUCCESSFUL
+Total time: 5 seconds
+ </source>
+ <note>
+ As you have probably noticed, we like to document things right in the
+ script, on the theory that people only read online docs when desperate :)
+ </note>
+ <p>
+ You now have a template documentation structure all set up:
+ </p>
+ <source xml:space="preserve">
+[/home/me/forrest/my-test]$ tree
+.
+|-- build
+| `-- tmp
+| `-- projfilters.properties
+|-- forrest.properties
+|-- src
+| `-- documentation
+| |-- README.txt
+| |-- classes
+| | `-- CatalogManager.properties
+| |-- content
+| | |-- hello.pdf
+| | |-- test1.html
+| | |-- test2.html
+| | `-- xdocs
+| | |-- images
+| | | |-- group-logo.gif
+| | | |-- group.svg
+| | | |-- icon.png
+| | | |-- project-logo.gif
+| | | `-- project.svg
+| | |-- index.xml
+| | |-- samples
+| | | |-- ascii-art.xml
+| | | |-- cocoon-pyramid.aart
+| | | |-- faq.xml
+| | | |-- ihtml-sample.ihtml
+| | | |-- index.xml
+| | | |-- openoffice-writer.sxw
+| | | |-- sample.xml
+| | | |-- sample2.xml
+| | | |-- sdocbook.xml
+| | | |-- subdir
+| | | | |-- book-sample.xml
+| | | | `-- index.xml
+| | | `-- wiki-sample.cwiki
+| | |-- site.xml
+| | `-- tabs.xml
+| |-- skinconf.xml
+| `-- translations
+| |-- langcode.xml
+| |-- languages_en.xml
+| |-- languages_es.xml
+| |-- menu.xml
+| |-- menu_af.xml
+| |-- menu_de.xml
+| |-- menu_es.xml
+| |-- menu_it.xml
+| |-- menu_no.xml
+| |-- menu_ru.xml
+| |-- menu_sk.xml
+| |-- tabs.xml
+| `-- tabs_es.xml
+|-- status.xml
+ </source>
+ <p>
+ To render this to HTML, type 'forrest'. You should have a HTML site rendered
+ into the <code>build/site</code> directory:
+ </p>
+ <figure src="images/new-project.png" height="356" width="500" alt="New project"/>
+ <p>
+ Practise with adding new content. Change to the directory
+ <code>src/documentation/content/xdocs</code> and copy the file
+ <code>index.xml</code> to create <code>my-new-file.xml</code> as a
+ new document. Edit it to change some text. Add an entry to
+ <code>site.xml</code> by copying one of the other entries and
+ changing it to suit. Now do 'forrest' to see the result.
+ </p>
+ </section>
+ <section id="seeding_existing">
+ <title>Seeding an existing project</title>
+ <p>
+ In the section above, we have run 'forrest seed' in an empty directory
+ to create a new project. If you have an existing codebase to which you
+ want to add Forrest docs, then run 'forrest seed' in your project base
+ directory, and the Forrest doc structure will be grafted onto your
+ project. This procedure only needs to be done once.
+ </p>
+ <p>
+ If your project already has XML documentation, it may be easier to tell
+ Forrest where the XML sources are, rather than rearrange your project
+ directories to accommodate Forrest. This can be done by editing
+ <code>forrest.properties</code> (consult
+ the <link href="#Changing_the_layout">Changing the layout</link>
+ section for more details).
+ </p>
+ </section>
+ <section id="customizing">
+ <title>Customizing your project</title>
+ <p>
+ Having seeded a project with template docs, you will now want to customize it
+ to your project's needs. Here we will deal with configuring the skin, and
+ changing the project layout.
+ </p>
+ <section id="skinconf.xml">
+ <title>Configuring the Forrest skin: skinconf.xml</title>
+
+ <p>
+ Most Forrest skins can be customized through a single XML file,
+ <code>src/documentation/skinconf.xml</code>, which looks like this:
+ </p>
+<source xml:space="preserve"><![CDATA[
+<!--
+Skin configuration file. This file contains details of your project,
+which will be used to configure the chosen Forrest skin.
+-->
+
+ <!DOCTYPE skinconfig PUBLIC
+ "-//APACHE//DTD Skin Configuration V0.6-2//EN"
+ "skinconfig-v06-2.dtd">
+
+<skinconfig>
+ <!-- To enable lucene search add provider="lucene"
+ Add box-location="alt" to move the search box to an alternate location
+ (if the skin supports it) and box-location="all" to show it in all
+ available locations on the page. Remove the <search> element to show
+ no search box.
+ -->
+ <search name="MyProject" domain="mydomain"/>
+
+ <!-- Disable the print link? If enabled, invalid HTML 4.0.1 -->
+ <disable-print-link>true</disable-print-link>
+ <!-- Disable the PDF link? -->
+ <disable-pdf-link>false</disable-pdf-link>
+ <!-- Disable the xml source link? -->
+ <!-- The xml source link makes it possible to access the xml rendition
+ of the source frim the html page, and to have it generated statically.
+ This can be used to enable other sites and services to reuse the
+ xml format for their uses. Keep this disabled if you don't want other
+ sites to easily reuse your pages.-->
+ <disable-xml-link>true</disable-xml-link>
+
+ <!-- Disable navigation icons on all external links? -->
+ <disable-external-link-image>false</disable-external-link-image>
+
+ <!-- Disable w3c compliance links? -->
+ <disable-compliance-links>false</disable-compliance-links>
+ <!-- Render mailto: links unrecognisable by spam harvesters? -->
+ <obfuscate-mail-links>true</obfuscate-mail-links>
+
+ <!-- mandatory project logo
+ skin: forrest-site renders it at the top -->
+ <project-name>MyProject</project-name>
+ <project-description>MyProject Description</project-description>
+ <project-url>http://myproj.mygroup.org/</project-url>
+ <project-logo>images/project.png</project-logo>
+ <!-- Alternative static image:
+ <project-logo>images/project-logo.gif</project-logo> -->
+
+ <!-- optional group logo
+ skin: forrest-site renders it at the top-left corner -->
+ <group-name>MyGroup</group-name>
+ <group-description>MyGroup Description</group-description>
+ <group-url>http://mygroup.org</group-url>
+ <group-logo>images/group.png</group-logo>
+ <!-- Alternative static image:
+ <group-logo>images/group-logo.gif</group-logo> -->
+
+ <!-- optional host logo (e.g. sourceforge logo)
+ skin: forrest-site renders it at the bottom-left corner -->
+ <host-url></host-url>
+ <host-logo></host-logo>
+
+ <!-- relative url of a favicon file, normally favicon.ico -->
+ <favicon-url></favicon-url>
+
+ <!-- The following are used to construct a copyright statement -->
+ <year>2005</year>
+ <vendor>The Acme Software Foundation.</vendor>
+ <!-- The optional copyright-link URL will used as a link in the
+ copyright statement
+ <copyright-link>http://www.apache.org/licenses/</copyright-link>
+ -->
+
+ <!-- Some skins use this to form a 'breadcrumb trail' of links.
+ If you don't want these, then set the attributes to blank.
+ The DTD purposefully requires them.
+ Use location="alt" to move the trail to an alternate location
+ (if the skin supports it).
+ -->
+ <trail>
+ <link1 name="myGroup" href="http://www.apache.org/"/>
+ <link2 name="myProject" href="http://forrest.apache.org/"/>
+ <link3 name="" href=""/>
+ </trail>
+
+ <!-- Configure the TOC, i.e. the Table of Contents.
+ @max-depth
+ how many "section" levels need to be included in the
+ generated Table of Contents (TOC).
+ @min-sections
+ Minimum required to create a TOC.
+ @location ("page","menu","page,menu")
+ Where to show the TOC.
+ -->
+ <toc max-depth="2" min-sections="1" location="page"/>
+
+ <!-- Heading types can be clean|underlined|boxed -->
+ <headings type="boxed"/>
+
+ <extra-css>
+ <!-- A sample to show how the class attribute can be used -->
+ p.quote {
+ margin-left: 2em;
+ padding: .5em;
+ background-color: #f0f0f0;
+ font-family: monospace;
+ }
+ </extra-css>
+
+ <colors>
+ <!-- CSS coloring examples omitted for brevity -->
+ </colors>
+
+ <!-- Settings specific to PDF output. -->
+ <pdf>
+ <!--
+ Supported page sizes are a0, a1, a2, a3, a4, a5, executive,
+ folio, legal, ledger, letter, quarto, tabloid (default letter).
+ Supported page orientations are portrait, landscape (default
+ portrait).
+ Supported text alignments are left, right, justify (default left).
+ -->
+ <page size="letter" orientation="portrait" text-align="left"/>
+
+ <!--
+ Margins can be specified for top, bottom, inner, and outer
+ edges. If double-sided="false", the inner edge is always left
+ and the outer is always right. If double-sided="true", the
+ inner edge will be left on odd pages, right on even pages,
+ the outer edge vice versa.
+ Specified below are the default settings.
+ -->
+ <margins double-sided="false">
+ <top>1in</top>
+ <bottom>1in</bottom>
+ <inner>1.25in</inner>
+ <outer>1in</outer>
+ </margins>
+
+ <!--
+ Print the URL text next to all links going outside the file
+ -->
+ <show-external-urls>false</show-external-urls>
+ </pdf>
+
+ <!-- Credits are typically rendered as a set of small clickable
+ images in the page footer -->
+ <credits>
+ <credit>
+ <name>Built with Apache Forrest</name>
+ <url>http://forrest.apache.org/</url>
+ <image>images/built-with-forrest-button.png</image>
+ <width>88</width>
+ <height>31</height>
+ </credit>
+ <!-- A credit with @role='pdf' will have its name and url
+ displayed in the PDF page's footer. -->
+ </credits>
+
+</skinconfig>
+]]></source>
+ <p>
+ Customise this file for your project. The <code>images/</code> directory
+ mentioned in 'project-logo' and 'group-logo' elements corresponds to the
+ <code>src/documentation/resources/images</code> directory
+ (this mapping is done automatically by the sitemap).
+ </p>
+ <p>
+ Having edited this file (and ensured it is valid XML), re-run the 'forrest'
+ command in the site root, and the site would be updated.
+ </p>
+ </section>
+ <section id="Changing_the_layout">
+ <title>Changing the layout: forrest.properties</title>
+ <p>
+ Forrest allows you to place files anywhere you want in your
+ project, so long as you tell Forrest where you have placed the
+ major file types.
+ </p>
+ <p>
+ The <code>forrest.properties</code> file maps from your directory
+ layout to Forrest's. If you generated your site with 'forrest seed', you
+ will have one pre-written, with all the entries commented out.
+ </p>
+ <note>
+ You only need to un-comment entries if you are going to change them
+ to something different.
+ If you keep in synchronisation with the 'forrest seed' defaults,
+ then it is easy to diff each time that you update.
+ </note>
+ <p>
+ The main entries (with default values) are:
+ </p>
+ <source xml:space="preserve">
+# Properties that must be set to override the default locations
+#
+# Parent properties must be set. This usually means uncommenting
+# project.content-dir if any other property using it is uncommented
+
+#project.status=status.xml
+#project.content-dir=src/documentation
+#project.conf-dir=${project.content-dir}/conf
+#project.sitemap-dir=${project.content-dir}
+#project.xdocs-dir=${project.content-dir}/content/xdocs
+#project.resources-dir=${project.content-dir}/resources
+#project.stylesheets-dir=${project.resources-dir}/stylesheets
+#project.images-dir=${project.resources-dir}/images
+#project.schema-dir=${project.resources-dir}/schema
+#project.skins-dir=${project.content-dir}/skins
+#project.skinconf=${project.content-dir}/skinconf.xml
+#project.lib-dir=${project.content-dir}/lib
+#project.classes-dir=${project.content-dir}/classes
+ </source>
+ <p>
+ For example, if you wish to keep XML documentation in src/xdocs rather than
+ <code>src/documentation/content/xdocs</code> simply change the
+ definition for project.xdocs-dir
+ </p>
+ <source xml:space="preserve">project.xdocs-dir=src/xdocs</source>
+ <p>
+ For example, to emulate the simple
+ <link href="http://maven.apache.org/">Maven</link> format:
+ </p>
+ <p xml:space="preserve">
+ /xdocs
+ /xdocs/images
+ /xdocs/stylesheets
+ </p>
+ <p>Here are the required property definitions:</p>
+ <source xml:space="preserve">
+project.content-dir=xdocs
+project.sitemap-dir=${project.content-dir}
+project.xdocs-dir=${project.content-dir}
+project.stylesheets-dir=${project.content-dir}/stylesheets
+project.images-dir=${project.content-dir}/images
+project.skinconf=${project.content-dir}/skinconf.xml
+ </source>
+<!-- Does anyone know what this note means? -->
+ <note>
+ Internally, Forrest rearranges the specified directory into the default
+ <code>src/documentation/content/xdocs</code> structure. In the layout above, we have
+ overlapping directories, so you will end up with duplicate files. This small
+ glitch doesn't usually cause problems; just always remember that all links
+ are resolved through the sitemap.
+ </note>
+ </section>
+
+ </section>
+
+ <section id="adding_content">
+ <title>Adding content</title>
+ <p>
+ Now you can start adding content of your own, in
+ <code>src/documentation/content/xdocs</code>
+ </p>
+ <section id="site.xml">
+ <title>site.xml</title>
+ <p>
+ When adding a new xml document, you would add an entry to the project's
+ <code>site.xml</code> file. This site.xml is like a site index, and is rendered as
+ the vertical column of links in the default skin. Look at Forrest's own
+ xdocs for an example. More detailed info about site.xml is provided in
+ the document <link href="site:v0.60//linking">Menus and Linking</link>.
+ </p>
+ </section>
+ <section id="tabs.xml">
+ <title>tabs.xml</title>
+ <p>
+ The <code>tabs.xml</code> file is used to produce the 'tabs'.
+ which enable users to quickly jump to sections of your site.
+ See the
+ <link href="site:v0.60//menu_generation">menu generation</link> documentation
+ for more details, and again, consult Forrest's own docs for a usage
+ example.
+ </p>
+ <figure src="images/tabs.png" alt="Tabs"/>
+ <p>You can have one or two levels of tabs. The images above show a
+ single level. However, you can create a second level that
+ will only be displayed when its parent tab is selected. For example,
+ the <code>tabs.xml</code> snippet below will display either one or
+ two rows of tabs, depending on which of the top level tabs is selected.
+ The first row will have two tabs: one labelled <code>How-Tos</code>
+ and the other labelled <code>Apache XML Projects</code>. When the
+ <code>How-Tos</code> tab is selected there will
+ be no second row of tabs. However, when the <code>Apache XML
+ Projects</code> tab is selected, a second row of tabs will be displayed
+ below the first.</p>
+ <source xml:space="preserve"><![CDATA[
+ <tab label="How-Tos" dir="community/howto/"/>
+ <tab label="Apache XML Projects" href="http://xml.apache.org">
+ <tab label="Forrest" href="http://forrest.apache.org/"/>
+ <tab label="Xerces" href="http://xml.apache.org/xerces"/>
+ </tab>
+]]></source>
+ </section>
+ <section id="images">
+ <title>Images</title>
+ <p>
+ Images usually go in <code>src/documentation/resources/images/</code>
+ The default sitemap
+ maps this directory to <code>images/</code>, so image tags will typically look
+ like <figure src="images/project-logo.png" alt="Project Logo"/>
+ </p>
+ </section>
+ </section>
+
+ <section id="sitemap.xmap">
+ <title>Advanced customizations: sitemap.xmap</title>
+ <p>
+ The Cocoon sitemap is a set of rules for generating content (HTML, PDFs etc)
+ from XML sources. Forrest has a default sitemap, which is adequate for
+ everyday sites. For example, the
+ <link href="ext:forrest">Forrest website</link> itself uses the
+ default sitemap.
+ </p>
+ <p>
+ Sometimes, one needs to go beyond the default set of rules. This is where
+ Forrest really shines, because its Cocoon backend allows virtually any
+ processing pipeline to be defined. For example, one can:
+ </p>
+ <ul>
+ <li>Transform custom XML content types with XSLT stylesheets.</li>
+ <li>Generate PNG or JPEG images from
+ <link href="http://www.w3.org/TR/SVG/">SVG</link> XML files.
+ (<strong>Note:</strong> Forrest's sitemap now does this natively.)</li>
+ <li>Integrate external XML feeds (e.g. RSS) into your site's content.
+ (<strong>Note:</strong> See issues.xmap for an example.)</li>
+ <li>Merge XML sources via aggregation, or make content from large XML
+ sources available as "virtual" files.
+ (<strong>Note:</strong> Forrest makes extensive use of aggregation
+ in the default sitemaps. It also defines a whole-site HTML
+ and PDF, available as the standard names <code>wholesite.html</code>
+ and <code>wholesite.pdf</code>.)</li>
+ <li>Read content from exotic sources like
+ <link href="http://www.rpbourret.com/xml/XMLDBLinks.htm">XML
+ databases</link>.</li>
+ <li>Integrate any of <link href="ext:cocoon">Cocoon's</link> vast array
+ of capabilities. The possibilities are best appreciated by
+ downloading the latest Cocoon distribution and playing with the
+ samples.</li>
+ </ul>
+ <p>
+ The Forrest sitemaps are at
+ <code>forrest/src/core/context/*.xmap</code>
+ </p>
+
+ <p>
+ You can add pre-processing sitemaps to your project
+ <code>src/documentation</code> directory (or wherever
+ <code>${project.sitemap-dir}</code> points to). Any match that
+ is not handled, passes through to be handled by the default Forrest
+ sitemaps - obviously extremely powerful. The capability is described
+ in
+ "<link href="site:v0.60//project-sitemap">Using project sitemaps</link>"
+ and some worked examples are shown in the following sections here.
+ </p>
+ <note>
+ We advise you to spend time to understand the Apache Cocoon sitemap.
+ See <link href="ext:cocoon/sitemap">Cocoon sitemap</link>
+ and <link href="ext:cocoon/concepts">Cocoon concepts</link>
+ and related component documentation.
+ The Forrest sitemap is broken into multiple files. The main one is
+ <strong>sitemap.xmap</strong> which delegates to others. See the
+ <link href="site:v0.60//sitemap-ref">Sitemap Reference</link> for a tour of the
+ default sitemap.
+ </note>
+ <section id="adding_new_content_type">
+ <title>Example: Adding a new content type</title>
+ <p>
+ Follow this worked example. In a fresh directory do 'forrest seed'
+ then follow the steps described in this section.
+ </p>
+ <p>
+ An example scenario is that we have a specialised list of downloads
+ for a certain software package. It would be best to represent the
+ download information in a custom XML format. This means that it
+ will have its own document type declaration. We will need
+ to detect this new document type via our project sitemap
+ and also provide a mapping to a local copy of this DTD.
+ </p>
+ <source xml:space="preserve"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE document PUBLIC "-//Acme//DTD Download Documentation V1.0//EN"
+ "dtd/download-v10.dtd">
+<document>
+ <header>
+ <title>Downloading Binaries</title>
+ </header>
+ <body>
+ <section id="download">
+ <title>Downloading binaries</title>
+ <p>
+ Here are the binaries for FooProject
+ </p>
+ <release version="0.9.13" date="2002-10-11">
+ <downloads>
+ <file
+ url="http://prdownloads.sf.net/aft/fooproj-0.9.13-bin.zip?download"
+ name="fooproj-0.9.13-bin.zip"
+ size="5738322"/>
+ <file
+ url="http://prdownloads.sf.net/aft/fooproj-0.9.13-src.zip?download"
+ name="fooproj-0.9.13-src.zip"
+ size="10239777"/>
+ </downloads>
+ </release>
+ <release version="0.9.12" date="2002-10-08">
+ <downloads>
+ <file
+ url="http://prdownloads.sf.net/aft/fooproj-0.9.12-src.zip?download"
+ name="fooproj-0.9.12-src.zip"
+ size="10022737"/>
+ </downloads>
+ </release>
+ </section>
+ <section id="cvs">
+ <title>Getting FooProject from CVS</title>
+ <p>....</p>
+ </section>
+ </body>
+</document>]]></source>
+ <p>This file called "<code>download.xml</code>" would be placed in
+ your content directory (typically
+ <code>src/documentation/content/xdocs</code>) and an entry added to
+ <code>site.xml</code></p>
+ <p>
+ To handle these special tags, one would write a stylesheet to convert
+ them to the intermediate Forrest xdocs structure. Here is such a stylesheet,
+ called "<code>download2document.xsl</code>" ...
+ </p>
+ <source xml:space="preserve"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:template match="release">
+ <section id="{@version}">
+ <title>Version <xsl:value-of select="@version"/> (released
+ <xsl:value-of select="@date"/>)</title>
+ <table>
+ <tr><th>File</th><th>Size</th></tr>
+ <xsl:apply-templates select="downloads/*"/>
+ </table>
+ </section>
+ </xsl:template>
+
+ <xsl:template match="file">
+ <tr>
+ <td><link href="{@url}"><xsl:value-of select="@name"/></link></td>
+ <td><xsl:value-of
+ select="format-number(@size div (1024*1024), '##.##')"/> MB</td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="@* | node() | comment()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
+]]></source>
+ <p>
+ Place this file in the default stylesheets directory,
+ <code>src/documentation/resources/stylesheets</code> (or wherever
+ ${project.stylesheets-dir} points).
+ </p>
+ <p>
+ Now we will create a project sitemap to control the
+ transformation of our custom xml
+ structure into the Forrest intermediate xdocs structure.
+ </p>
+ <note>
+ The <link href="site:v0.60//sitemap-ref">Sitemap
+ Reference</link> provides details about how the sitemap works.
+ </note>
+ <p>
+ Add the following as the file
+ <code>src/documentation/sitemap.xmap</code> ...
+ </p>
+ <source xml:space="preserve"><![CDATA[<?xml version="1.0"?>
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+ <map:pipelines>
+ <map:pipeline>
+ <map:match pattern="**download.xml">
+ <map:generate src="{project:content.xdocs}{1}download.xml" />
+ <map:transform src="{project:resources.stylesheets}/download2document.xsl" />
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
+ </map:pipelines>
+</map:sitemap>
+]]></source>
+ <p>
+ That will intercept the request for the body content, for only
+ this specific "download" document, and will transform it into the
+ intermediate Forrest "document" format. The normal Forrest machinery
+ will handle the aggregation with navigation menus etc. and will
+ apply the normal skin.
+ </p>
+
+ <section id="new_dtd">
+ <title>Registering a new DTD</title>
+ <p>
+ By default, Forrest requires that all XML files be valid, i.e.
+ they must have a DOCTYPE declaration and associated DTD, and
+ validate against it. Our new 'downloads' document type is no
+ exception. The <link href="site:v0.60//validation">XML
+ Validation</link> document continues this example, showing how
+ to register a new document type. Briefly, this involves:
+ </p>
+ <ul>
+ <li>Create a new DTD or (in our case) extend an existing
+ one.</li>
+ <li>Place the new DTD in the
+ <code>${project.schema-dir}/dtd</code> directory.</li>
+ <li>Add an XML Catalog to enable a mapping from the
+ DOCTYPE public id to the relevant DTD file.</li>
+ <li>Tell the system about your catalog.</li>
+ </ul>
+ <note>
+ Please see <link href="site:v0.60//validation">XML Validation</link>
+ for the complete description for those steps.
+ </note>
+ </section>
+ </section>
+
+ <section id="adding_new_content_type_2">
+ <title>Example: Adding a new content type (advanced)</title>
+ <p>
+ The simple user sitemap in the previous example is fine for
+ simple situations. For a complete solution to the "Download DTD"
+ issue we need a more advanced sitemap which will do different
+ processing depending on the version of the document type
+ declaration. Let us show the sitemap and then explain it.
+ </p>
+ <source xml:space="preserve"><![CDATA[<?xml version="1.0"?>
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:components>
+ <map:selectors default="parameter">
+ <map:selector logger="sitemap.selector.parameter"
+ name="parameter" src="org.apache.cocoon.selection.ParameterSelector" />
+ </map:selectors>
+ <map:actions>
+ <map:action logger="sitemap.action.sourcetype" name="sourcetype"
+ src="org.apache.cocoon.acting.sourcetype.SourceTypeAction">
+ <sourcetype name="download-v1.0">
+ <document-declaration
+ public-id="-//Acme//DTD Download Documentation V1.0//EN" />
+ </sourcetype>
+ <sourcetype name="download-v1.1">
+ <document-declaration
+ public-id="-//Acme//DTD Download Documentation V1.1//EN" />
+ </sourcetype>
+ </map:action>
+ </map:actions>
+ </map:components>
+
+ <map:pipelines>
+ <map:pipeline>
+ <map:match pattern="**download.xml">
+ <map:generate src="{project:content.xdocs}{1}download.xml" />
+ <map:act type="sourcetype" src="{project:content.xdocs}{1}download.xml">
+ <map:select type="parameter">
+ <map:parameter name="parameter-selector-test" value="{sourcetype}" />
+ <map:when test="download-v1.0">
+ <map:transform
+ src="{project:resources.stylesheets}/download2document.xsl" />
+ </map:when>
+ <map:when test="download-v1.1">
+ <map:transform
+ src="{project:resources.stylesheets}/download-v11-2document.xsl" />
+ </map:when>
+ </map:select>
+ </map:act>
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
+ </map:pipelines>
+</map:sitemap>
+]]></source>
+ <p>
+ This is the type of processing that happens in the main
+ <code>src/core/context/forrest.xmap</code> sitemap. We have
+ added similar handling to our project sitemap. Basically, this
+ uses the <link href="site:v0.60//cap">SourceTypeAction (content aware pipelines)</link>
+ to detect the doctype. The new document-v11.dtd needs to be also
+ added to your project Catalog.
+ </p>
+ <p>
+ Note that any sitemap component must be declared before it
+ can be used, because the project sitemap is the first sitemap
+ to be consulted.
+ </p>
+ </section>
+
+ <section id="integrating_rss">
+ <title>Example: integrating external RSS content</title>
+ <p>Similar to the previous example, we can integrate RSS into our
+ site simply by providing a match in our project sitemap.xmap ...
+ </p>
+ <source xml:space="preserve"><![CDATA[<?xml version="1.0"?>
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+ <map:pipelines>
+ <map:pipeline>]]>
+ <strong><![CDATA[
+ <map:match pattern="**weblog.xml">
+ <map:generate src="http://blogs.cocoondev.org/stevenn/index.rss"/>
+ <map:transform src="{forrest:stylesheets}/rss2document.xsl"/>
+ <map:serialize type="xml"/>
+ </map:match>
+]]></strong><![CDATA[
+ <map:match pattern=".......">
+ <!-- handle other project-specific matches -->
+ </map:match>
+ </map:pipeline>
+ </map:pipelines>
+</map:sitemap>
+]]></source>
+ <p>You will probably want to copy the core Forrest
+ <code>rss2document.xsl</code> to your project,
+ customise it to your needs, and refer to it with
+ <code>src="{project:resources.stylesheets}/rss2document.xsl"</code>.
+ Then of course you would add an entry to site.xml to link
+ to weblog.html
+ </p>
+ </section>
+ </section>
+
+ <section id="skins">
+ <title>Forrest skins</title>
+ <p>
+ As Forrest separates content from presentation, we can plug in different
+ "skins" to instantly change a site's look and feel. Forrest provides one
+ primary skin, <code>pelt</code>, and some others in various
+ states of development.
+ To change the skin, edit the <code>forrest.properties</code> file
+ to set <code>project.skin=leather-dev</code> or some other skin name.
+ </p>
+ <note>
+ Forrest supplies a collection of
+ <link href="site:v0.60//skins">default skins</link> which are configurable
+ and so should meet the needs of most projects. The aim is to provide
+ many capabilities so that extra skins are not needed.
+ </note>
+
+ <section id="skin-configuration">
+ <title>Configuration of skins</title>
+ <p>
+ All configuration is done via your project
+ <code>src/documentation/skinconf.xml</code> file.
+ It contains many comments to describe each capability.
+ Please read those, there is no point repeating here.
+ </p>
+ </section>
+
+ <section id="new_skin">
+ <title>Defining a new skin</title>
+ <p>Consider discussing your needs on the mailing lists. There may
+ be planned enhancements to the core skins. Also consider contributing
+ your extensions to the core skins, rather than write your own skin.
+ Bear in mind that you could be creating an update and management
+ issue. Anyway, ...
+ </p>
+ <p>
+ Projects can define their own skin in the
+ <code>src/documentation/skins</code> directory (or wherever
+ <code>${project.skins-dir}</code> points). The default sitemap assumes a
+ certain skin layout, so the easiest way to create a new skin is by
+ copying an existing Forrest skin. For example, copy
+ <code>forrest/src/core/context/skins/pelt</code>
+ to your project area at
+ <code>src/documentation/skins/my-fancy-skin</code> and add
+ <code>project.skin=my-fancy-skin</code> to forrest.properties
+ </p>
+ <p>
+ The two most interesting XSLT stylesheets involved are:
+ </p>
+ <dl>
+ <dt><code>xslt/html/document2html.xsl</code></dt>
+ <dd>
+ This stylesheet is applied to individual Forrest xdocs XML files, and
+ converts them to HTML suitable for embedding in a larger HTML page.
+ </dd>
+ <dt><code>xslt/html/site2xhtml.xsl</code></dt>
+ <dd>
+ This stylesheet generates the final HTML file from an intermediate
+ 'site' structure produced by the other stylesheets. It defines the general
+ layout, and adds the header and footer.
+ </dd>
+ </dl>
+ <p>
+ Typically there is a lot of commonality between skins. XSLT
+ provides an 'import' mechanism whereby one XSLT can extend another.
+ Forrest XSLTs typically 'import' from a common base:
+ </p>
+ <source xml:space="preserve"><![CDATA[
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:import href="../../../common/xslt/html/document2html.xsl"/>
+
+ ]]><strong>... overrides of default templates ...</strong><![CDATA[
+</xsl:stylesheet>]]></source>
+
+ <p>In order to use this feature in your custom skins you must copy
+ the common skin from the forrest distribution into your custom skins
+ directory (from <code>forrest/src/core/context/skins/common</code>).
+ This will protect your skin from changes in the Forrest common skin,
+ but you must remember to update this skin in order to take advantage
+ of new features added over time by the Forrest team.</p>
+ <p>This is particularly relevant for menu rendering (book2menu.xsl),
+ where the common stylesheet does the 'logic' of which item is
+ selected, and over-riding stylesheets define the presentation.</p>
+ </section>
+ </section>
+
+ <section id="webapp">
+ <title>Interactive Forrest: faster turnaround when developing your docs</title>
+ <p>
+ In comparison to simpler tools (like
+ <link href="ext:anakia">Anakia</link>) the Cocoon command-line mode
+ (and hence Forrest command-line mode) is slow.
+ As the <link href="site:v0.70//dreams">dream list</link> notes, Forrest was
+ originally intended to be used for
+ dynamic sites, and the Cocoon crawler used only to create static
+ snapshots for mirroring. This section describes how, by using
+ a "live" Forrest webapp instance, the Forrest-based documentation
+ development can be faster and easier than with comparable tools.
+ </p>
+ <section id="forrest_run">
+ <title>Running as a webapp</title>
+ <p>
+ Type '<code>forrest run</code>' in your project root to start Forrest's
+ built-in Jetty web server. Once it has started, point your browser at
+ <link href="http://localhost:8888/">http://localhost:8888/</link>, which
+ will show your website, rendered on demand as each link is followed.
+ </p>
+ <p>(Alternatively, if you wish to run Forrest from within an existing
+ servlet container, type <code>forrest webapp</code> to build an open
+ webapp in <code>build/webapp/</code>)
+ </p>
+ <section id="using_webapp">
+ <title>Using the webapp</title>
+ <p>
+ You can now edit the XML content in
+ <code>build/webapp/content/xdocs</code> and see the changes
+ immediately in the browser.
+ </p>
+ </section>
+ </section>
+ </section>
+ <section id="invoking_from_ant">
+ <title>Invoking Forrest from Ant</title>
+ <p>
+ Ant has an
+ <link href="http://ant.apache.org/manual/CoreTasks/import.html"><import></link>
+ task which can be used to invoke Forrest from Ant. All targets and properties
+ are imported and can be used in your project build. Here is a simple example:
+ </p>
+ <source xml:space="preserve"><![CDATA[
+<project name="myproject" default="hello">
+ <!-- FORREST_HOME must be set as an environment variable -->
+ <property environment="env"/>
+ <property name="forrest.home" value="${env.FORREST_HOME}"/>
+ <import file="${env.FORREST_HOME}/forrest.build.xml"/>
+
+ <!-- 'site' is a target imported from forrest.build.xml -->
+ <target name="post-build" depends="site">
+ <echo>something here</echo>
+ </target>
+</project>
+ ]]></source>
+ <p>Because you are using your own version
+ of Ant to do Forrest's work, you will need to provide the
+ supporting catalog entity resolver:
+ '<code>cp forrest/lib/core/xml-commons-resolver-1.1.jar $ANT_HOME/lib</code>'
+ </p>
+
+ <p>(Note: The technique described above requires Ant 1.6+ otherwise the <import>
+ task will not be available for you to use. Forrest
+ bundles the latest version of Ant, so you can invoke your project
+ like this: <code>forrest -f myproject.xml</code>.
+ This will not run forrest; it will just use Forrest's Ant to execute
+ your buildfile.)
+ </p>
+ <p>
+ Another option is to use the Forrest Antlet from the Krysalis Project's <link href="http://antworks.sourceforge.net/importer/">Antworks Importer</link>.
+ </p>
+ <p>
+ The <link href="site:forrestbot">Forrestbot</link> provides workstages
+ to get source, build, deploy, and notify. This is very useful for
+ automating builds; you may want to consider using the Forrestbot.
+ </p>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Propchange: forrest/site/docs_0_60/your-project.source.xml
------------------------------------------------------------------------------
svn:eol-style = native