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.
Usage
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&version=live&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:transform> <map:serialize type="xml"/> </map:match>
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="" xmlns="http://apache.org/forrest/linkmap/1.0" xmlns:xi="http://www.w3.org/2001/XInclude" tab=""> <xi:include href="cocoon://1208.daisy.navigation"/> </site>
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
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
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.