Return-Path:
- This can be done by overriding the
- This means creating a directory
-
- This default XPath expression ignores links containing 'apidocs' or
- starting with 'api/'. This is just an example, and you should modify
- it appropriately for your site.
-
- With the CVS version of Forrest, this is all that is required.
- Forrest 0.4 needs one more change: a custom sitemap must be created
- (copy to:
- A bit of background may help explain all this. Cocoon generates a static
- version of a website by 'crawling' through the pages—that is,
- following links to determine what else to render. Starting with
-
- request the 'links view' of that page, e.g.
-
- The concept of 'views' is explained in the
- Cocoon documentation; briefly, Cocoon allows different
- representations of a page, and these are called views. The links
- view is a simple text listing of the page's embedded links. The
- links view is specified in the Forrest sitemap with:
-
- The XSLT transformation just before the serializer gives us an
- opportunity to filter out any links we don't want Cocoon to
- process. As the link view is a separate pipeline, the normal page
- output will be unaffected.
- This is just an example, and you should modify it appropriately for
+ your site.
@@ -179,37 +135,95 @@
Alternative you can use JAI (Java Advanced Imaging API). For more
- info, see FOP Graphics
- Packages
- filterlinks.xsl
- stylesheet, and modifying it to filter out links that shouldn't be
- traversed.
+ This can be done by overriding the cli.xconf
config file,
+ and defining patterns for URLs to exclude.
src/documentation/resources/stylesheets
(or wherever
- ${forrest.stylesheets-dir}
points) and copying
- $FORREST_HOME/context/resources/stylesheets/filterlinks.xsl
- to it. Then edit filterlinks.xsl, and add extra conditions to the
- xsl:if
statement:
+ This means creating a directory src/documentation/conf
+ (or wherever ${forrest.conf-dir}
points) and copying
+ $FORREST_HOME/WEB-INF/cli.xconf
to it. Then edit
+ cli.xconf, and add any exclude sections you require at the end. The
+ default cli.xconf ignores links containing 'apidocs' or starting with
+ 'api/':
$FORREST_HOME/context/sitemap.xmap
to
- src/documentation/sitemap.xmap
, aka
- ${project.sitemap}
), and change line 394 from:
- index.html
, Cocoon will:
-
-
+
+ index.html
index.html?cocoon-view=links
.
- foo/bar
, but not foo/bar/baz
— use foo/** to match that.
+
Document root
- element "site", must match DOCTYPE root "null".
.
+ The tab link in my site incorrectly assumes that 'index.html' is present in
+ the linked-to directory. How do I fix this?
- You are probably trying to build the project with an old version of
- Forrest (built before 2003-01-08) that is incorrectly trying to validate
- the &s; file. If so, please update your Forrest
- installation.
+ In tabs.xml
, use @href instead of @dir, and omit the trailing
+ '/'. That will leave which file to serve up to the sitemap. For example, if
+ the 'User Manual' tab should link to manual/Introduction.html
,
+ tabs.xml
should contain:
+
+ and add this rule to the sitemap:
+ +
- Alternatively, you may be building with an up-to-date Forrest, but have
- overridden forrest.validate.xdocs.excludes
in
- forrest.properties
. With the introduction of
- &s;, the above property must have &s;
- listed to prevent an attempt at DTD-based validation.
+ If you are using JDK 1.4.0 or newer, you can enable headless
+ operation by running Forrest with the forrest.jvmarg
+ parameter set to -Djava.awt.headless=true
, like this:
First consider whether your needs would be better met by Cocoon itself, rather than Forrest. Forrest was + designed primarily with static sites in mind, and is not a general-purpose Cocoon distribution.
+That said, there are valid reasons for wanting programmatically generated content, so here is how to enable + XSP:
+Override sitemap.xmap in your local project (copy $FORREST_HOME/context/sitemap.xmap to + src/documentation/conf/), and add the following generator definition in the map:generators section:
+ +Decide how you want to use XSP. For single files, you could just define a *.xml matcher:
+ +You may instead wish to override forrest.xmap to define a general mapping for XSPs.
+See also the AddingXSPToForrest Wiki page.
+forrest.antproxy.xml
, the build fails because
@@ -252,44 +266,25 @@
]]>
Document root
+ element "site", must match DOCTYPE root "null".
.
- In tabs.xml
, use @href instead of @dir, and omit the trailing
- '/'. That will leave which file to serve up to the sitemap. For example, if
- the 'User Manual' tab should link to manual/Introduction.html
,
- tabs.xml
should contain:
+ You are probably trying to build the project with an old version of
+ Forrest (built before 2003-01-08) that is incorrectly trying to validate
+ the &s; file. If so, please update your Forrest
+ installation.
- and add this rule to the sitemap:
+ Alternatively, you may be building with an up-to-date Forrest, but have
+ overridden forrest.validate.xdocs.excludes
in
+ forrest.properties
. With the introduction of
+ &s;, the above property must have &s;
+ listed to prevent an attempt at DTD-based validation.
- If you are using JDK 1.4.0 or newer, you can enable headless
- operation by running Forrest with the forrest.jvmarg
- parameter set to -Djava.awt.headless=true
, like this:
-
- The site.xml format was designed for - humans, not computers. The goals were for &s; to be exceedingly - simple, compact, easy to type and easy to read. The reuse of element - names as ids means that &s; has very few wasted characters. This odd - merging of content and markup has a few - disadvantages (DTD validation is out), but nothing that outweighs the - readability advantage. -
-- That said, pretty much any XML format may be used, simply by tweaking - the XPath template in the sitemap. In the future, &s; may be replaced - with some more standardized format, perhaps RDF or XTM (topic maps). - Volunteers for implementing alternative formats are welcome. -
-@@ -372,20 +345,6 @@ You can also use a mixture of the two methods, some handled automatically by Forrest and some directly using DocBook stylesheets. You can also have a mixture of "document-v*" DTD and DocBook. -
-- Sorry, we are working on that for the next release. Forrest development has - been very fast recently. Some of the documentation refers to old methods. - Your best bet is to start with the - Using Forrest document.