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/05/26 22:59:16 UTC
svn commit: r178688 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy:
input.xmap src/documentation/content/xdocs/index.xml
Author: rgardler
Date: Thu May 26 13:59:15 2005
New Revision: 178688
URL: http://svn.apache.org/viewcvs?rev=178688&view=rev
Log:
Add ability to filter content returned from repository
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/input.xmap
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/input.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/input.xmap?rev=178688&r1=178687&r2=178688&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/input.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/input.xmap Thu May 26 13:59:15 2005
@@ -39,14 +39,16 @@
<map:match
pattern="do/getRepositoryData/daisy/*/port/*/collection/*/doc/**.xml">
<map:generate type="html" src="http://{1}:{2}/{3}/{4}?navigationType=none" />
+ <map:transform src="{project:resources.stylesheets}/daisyFilter.xsl"/>
<map:transform src="{forrest:stylesheets}/html2document.xsl" />
<map:serialize type="xml" />
</map:match>
<map:match
- pattern="do/getRepositoryData/daisy/*/collection/*/doc/**.xml">
+ pattern="do/getRepositoryData/daisy/**/collection/*/doc/**.xml">
<map:generate type="html" src="http://{1}/{2}/{3}?navigationType=none" />
- <map:transform src="{forrest:stylesheets}/html2document.xsl" />
+ <map:transform src="{forrest:stylesheets}/html2document.xsl" />
+ <map:transform src="{project:resources.stylesheets}/daisyFilter.xsl"/>
<map:serialize type="xml" />
</map:match>
</map:pipeline>
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=178688&r1=178687&r2=178688&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 May 26 13:59:15 2005
@@ -89,6 +89,48 @@
</table>
<section>
+ <title>Filtering Content</title>
+ <p>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. To achieve this you can
+ provide an XSL file called <code>daisyFilter.xsl</code> in your
+ projects stylesheets directory (default location is
+ <code>PROJECT_HOME/src/documentation/resources/stylesheets</code>).
+ Using this file you can filter out any part of the content you
+ desire.</p>
+
+ <p>The XSL file operates on the XDoc generated by Forrest, not
+ on the source format of the document. If you wish to look at the
+ XDoc 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>
<title>Examples</title>
<ul>
<li><a href="daisy/index.html?repositoryType=daisy-wiki&repositoryURL=www.cocoondev.org&repositoryCollection=daisy&documentID=index">Daisy Home Page</a> (retrieved live, you must be online)</li>