This project has retired. For details please refer to its Attic page.
Welcome to the org.apache.forrest.plugin.output.Anakia Plugin
Apache Forrest > Plugins
Plugin: Anakia output
 
Font size:      

Welcome to the org.apache.forrest.plugin.output.Anakia Plugin

Overview

Produce output in Anakia-like "xdoc" format. Enables use of Forrest as a tool for gathering input from various sources, and output a consistent set of xml output documents. The output is similar to Apache Velocity Anakia "xdoc" format. See example.

Howto

In your project's forrest.properties file make the following changes ...

  • Declare the org.apache.forrest.plugin.output.Anakia plugin at the project.required.plugins property (comma-separated list).
  • Uncomment the project.start-uri property and set it to be anakia-start.xml

Now do 'forrest' to build your site as normal.

Alongside each *.html file there will now be a matching *.xdoc file.

How it works

Explanation of how this plugin works and how its output can be enhanced with additional processing.

Without touching any of the site source content or navigation system, we need to additionally inject another set of links to be processed. Each html output document will then also have a matching URI with *.xdoc extension.

This is achieved with the input.xmap sitemap. For the requested pipeline anakia-start.xml Forrest will generate the "linkmap" of the site navigation, then apply a transformation to amend each link.

This automatically enables the crawler to gather this set of links.

The output.xmap sitemap then handles each xdoc URI to transform the internal content structure. This plugin provides one stylesheet document-to-xdoc.xsl then applies a core transformation to make the xml output a bit more pretty.

To enhance the output, either amend the document-to-xdoc.xsl stylesheet (and please send changes) or insert another transformation of your own. In the output.xmap after the abovementioned transformation, add the line <map:transform src="{lm:anakia.transform.xdoc.mine}"/> and add your stylesheet (following the locationmap naming convention) at resources/stylesheets/xdoc-to-mine.xsl