Apache Forrest > org.apache.forrest.plugin.input.Daisy

Welcome to the org.apache.forrest.plugin.input.Daisy Plugin

Apache Forrest - org.apache.forrest.plugin.input.Daisy Plugin

This plugin retrieves documents from a Daisy repository.


The 0.3-Dev Daisy plugin does not allow you to mix Daisy content with non-Daisy content. You should continue to use version 0.2 if you need to mix content from multiple sources. This is a temporary restriction.

This plugin allows content to be retrieved from a Daisy CMS repository and displayed alongside any other Forrest content. Unlike many other plugins there is some configuraiton of your project requried.

Locationmap Configuration

The project locationmap for a Daisy generated site is automatically created from the daisy navigation documents. In order to tell Forrest how to generate these documents you must add a matcher to your project sitemap as follows:

<map:match pattern="locationmap-project.xml">
  <map:generate src="http://username:password@rop.domain.org:9263/publisher/blob?documentId=NAVIGATION-DOCUMENT-ID&amp;version=live&amp;partType=1"/>
  <map:transform src="{forrest:plugins}/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-locationmap.xsl">
    <map:parameter name="publisherURL" value="http://username:password@repo.domain.org:9263/publisher/"/>
    <map:parameter name="pathPrefix" value="/"/>
  <map:serialize type="xml"/>

Note that we use xi:include to include a navigation document in the site.xml file, in this case the document retrieved has id 1208. By using include in this way the site editor is free to use site.xml to reference content from other sources.

The pathPrefix is a prefix added to all paths to documents that are to be retrieved from the Daisy repository.

Using Daisy Navigation Documents

It is possible to use a daisy navigation document in place of a local site.xml file. However, in order to allow other content to be added to the forrest publication without requiring write access to the Daisy repository your project still requries a site.xml file.

A minimal site.xml file for your project would be:

<site label="MyProj" href="" 
  <xi:include href="cocoon://1208.daisy.navigation"/>

Retrieving RAW content

If you want to retrieve the raw, unprocessed XML from Daisy simply request the file with a .daisy.source extenstion.

Filtering Content

You may not have full control of the content in the repository, or you may wish to supress the presentation of some of the parts, for example, the fields within the repository. There are two points at which you can filter the content, at the point of retrieval (called a pre-filter) and once the file has been converted to the internal Forrest format (called a post-filter).


Pre-Filters are applied to the XML retrieved from the Daisy repository. To achieve this you can provide an XSL file called daisy/preFilter.xsl in your projects stylesheet directory (default location is PROJECT_HOME/src/documentation/resources/stylesheets).


Post-Filters are applied to the XDoc generated by Forrest. To achieve this you can provide an XSL file called daisy/postFilter.xsl in your projects stylesheet directory (default location is PROJECT_HOME/src/documentation/resources/stylesheets).

The postFilter XSL file operates on the XDoc generated by Forrest. If you wish to look at this format of the document simply request the page with an .xml extension.