You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2005/07/29 01:15:49 UTC
svn commit: r226285 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content:
locationmap.xml xdocs/index.xml
Author: rgardler
Date: Thu Jul 28 16:15:40 2005
New Revision: 226285
URL: http://svn.apache.org/viewcvs?rev=226285&view=rev
Log:
update documentation for locationmap use and direct connection to repository
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/locationmap.xml
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/index.xml
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/locationmap.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/locationmap.xml?rev=226285&r1=226284&r2=226285&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/locationmap.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/locationmap.xml Thu Jul 28 16:15:40 2005
@@ -27,8 +27,22 @@
</components>
<locator>
- <match pattern="daisy/**.xml">
- <location src="http://www.cocoondev.org/daisy/{1}.html?navigationType=none" />
- </match>
+
+ <match pattern="index.xml">
+ <location src="cocoon://654.daisy.xml" />
+ </match>
+
+ <match pattern="*.daisy.source">
+ <location src="http://cocoon.zones.apache.org:9263/publisher/documentPage?documentId={1}&includeNavigation=false&locale=en_US&version=live" />
+ </match>
+
+ <match pattern="*.daisy.img">
+ <location src="http://cocoon.zones.apache.org:9263/publisher/blob?documentId={1}&version=live&partType=3" />
+ </match>
+
+ <match pattern="*.daisy.navigation">
+ <location src="http://cocoon.zones.apache.org:9263/publisher/blob?documentId={1}&version=live&partType=1" />
+ </match>
+
</locator>
</locationmap>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/index.xml?rev=226285&r1=226284&r2=226285&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/index.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/index.xml Thu Jul 28 16:15:40 2005
@@ -45,64 +45,97 @@
space that is custom designed for the end user of the document
collection.</p>
- <p>In order to tell Forrest which document to retrieve from the
- repository you need to pass a number of request parameters in the URL.
- These are listed in the table below.</p>
-
- <warning>This behaviour will change shortly. Using request parameters is cumbersome
- and difficult to maintain. It also prevents a site from being statically generated.
- We will be moving towards using a location map to record the true location of a
- file. Use the current system with care.</warning>
-
- <table>
- <caption>Request Parameters</caption>
- <tr>
- <th>Parameter</th>
- <th>Comments</th>
- </tr>
- <tr>
- <th>repositoryType</th>
- <td>The type of repository to access. This indicates how the
- document is to be retreieved from the repository. At present this
- can only take the value of dais-wiki, which indicates the document
- is to be retreived via a daisy Wiki instance. Future versions of
- this plugin may allow documents to be retrieved directly from the
- repository server and other plugins may provide support for
- different repository types.</td>
- </tr>
- <tr>
- <th>repositoryURL</th>
- <td>The URL of the Daisy-Wiki interface to the repository.</td>
- </tr>
- <tr>
- <th>repositoryPort</th>
- <td>The Port number of the daisy-wiki application. If
- ommitted the default value of 80 is used.</td>
- </tr>
- <tr>
- <th>repositoryCollection</th>
- <td>The name of the collection in which the document is stored.</td>
- </tr>
- <tr>
- <th>documentID</th>
- <td>The ID of the document within Daisy. This can be the numeric
- identifier used by Daisy repository or it can be any valid ID as
- defined within the Daisy-Wiki. The documentID can also define
- a version and/or variant of the document if required. This is done
- in exactly the same way as would be done in he Daisy-Wiki.</td>
- </tr>
- </table>
+ <section>
+ <title>Locationmap</title>
+
+ <p>In order to tell Forrest which document to retrieve from the
+ repository you need to make use of the locationmap in Forrest. Your
+ project must therefore provide a locationmap similar to the one
+ that follows.</p>
+
+ <source><![CDATA[
+<locationmap xmlns="http://apache.org/forrest/locationmap/1.0">
+
+ <components>
+ <matchers default="lm">
+ <matcher
+ name="lm"
+ src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
+ </matchers>
+ </components>
+
+ <locator>
+
+ <match pattern="index.xml">
+ <location src="cocoon://908.daisy.xml" />
+ </match>
+
+ <match pattern="*.daisy.source">
+ <location src="http://username:password@repository.domain.com:9263/publisher/documentPage?documentId={1}&includeNavigation=false&locale=en_US&version=live" />
+ </match>
+
+ <match pattern="*.daisy.img">
+ <location src="http://username:password@repository.domain.com:9263/publisher/blob?documentId={1}&version=live&partType=3" />
+ </match>
+
+ <match pattern="*.daisy.navigation">
+ <location src="http://username:password@repository.domain.com:9263/publisher/blob?documentId={1}&version=live&partType=1" />
+ </match>
+
+ </locator>
+</locationmap>
+ ]]></source>
+
+ <p>The first match (<code>pattern="index.xml"</code>) will redirect
+ the request for index.xml to a named document
+ in the daisy repository. If you provide your index.xml file locally then omit
+ this matcher.</p>
+
+ <p>The next match (<code>pattern="*.daisy.source"</code>) is used by the plugin
+ to resolve requests for daisy documents.</p>
+
+ <p>The next match (<code>pattern="*.daisy.img"</code>) is used by the plugin
+ to resolve requests for images stored in the daisy repository.</p>
+
+ <p>The next match (<code>pattern="*.daisy.navigation"</code>) is used by the plugin
+ to resolve requests for daisy navigation documents.</p>
+
+ <note>In a future version of Forrest it planned to allow plugins to provide
+ locationmaps of their own. Therefore, the need for a project to provide this
+ locationmap will be removed.</note>
+ </section>
+
+ <section>
+ <title>Using Daisy Navigation Documents</title>
+ <p>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.</p>
+
+ <p>A minimal site.xml file for your project would be:</p>
+
+ <source><![CDATA[
+<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>
+ ]]></source>
+
+ <p>Note that we use <code>xi:include</code> 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.</p>
+ </section>
<section>
<title>Retrieving RAW content</title>
- <p>If you want to retrieve the raw, unprocessed HTML from
- Daisy simply request the file with a <code>.source.xml</code>
+ <p>If you want to retrieve the raw, unprocessed XML from
+ Daisy simply request the file with a <code>.daisy.source</code>
extenstion.</p>
-
- <warning>This behaviour will change in the future to enable
- you to retrieve the raw unprocessed XML rather than the
- HTML from Daisy. Use with care in the meantime.</warning>
</section>
+ </section>
<section>
<title>Filtering Content</title>
@@ -116,36 +149,12 @@
<section>
<title>Pre-Filters</title>
- <p>Pre-Filters are applied to the HTML retrieved from the
+ <p>Pre-Filters are applied to the XML retrieved from the
Daisy repository. To achieve this you can
provide an XSL file called <code>daisy/preFilter.xsl</code> in your
projects stylesheet directory (default location is
<code>PROJECT_HOME/src/documentation/resources/stylesheets</code>).</p>
- <p>The preFilter XSL file operates on the HTML generated by Daisy.
- If you wish to look at this format of the document simply request
- the page with an <code>.source.xml</code> extension.</p>
-
- <warning>This behaviour will change in the future,
- instead of processing the HTML produced by Daisy we will process
- the the XML. Use with care in the meantime.</warning>
-
- <section>
- <title>Example</title>
- <p>To filter out the document heading of the Daisy
- document, use the following XSL:</p>
-
- <source><![CDATA[
- <xsl:template match="h1[@class='daisy-document-name']"/>
-
- <xsl:template match="@*|*|text()|processing-instruction()|comment()">
- <xsl:copy>
- <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
- </xsl:copy>
- </xsl:template>
-</xsl:stylesheet>
- ]]></source>
- </section>
</section>
<section>
@@ -161,39 +170,7 @@
If you wish to look at this format of the document simply request
the page with an <code>.xml</code> extension.</p>
- <section>
- <title>Example</title>
- <p>To filter out the <code>Fields</code> section of the Daisy
- document, use the following XSL:</p>
-
- <source><![CDATA[
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
- <xsl:template match="section[title='Fields']"/>
-
- <xsl:template match="@*|*|text()|processing-instruction()|comment()">
- <xsl:copy>
- <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- ]]></source>
-
- <p>This XSL will filter out all fields from all files retreived
- from a Daisy repository. If you only wanted to remove them from
- specific files, or only remove specific fields you would need
- to extend this stylesheet accordingly.</p>
- </section>
- </section>
</section>
- </section>
-
- <section>
- <title>Examples</title>
- <ul>
- <li><a href="daisy/index.html">Daisy Home Page</a> (retrieved live, you must be online)</li>
- </ul>
</section>
</body>
</document>