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/28 01:25:35 UTC
svn commit: r225652 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy: ./
resources/stylesheets/ src/documentation/content/
src/documentation/content/xdocs/
Author: rgardler
Date: Wed Jul 27 16:25:12 2005
New Revision: 225652
URL: http://svn.apache.org/viewcvs?rev=225652&view=rev
Log:
Use the Daisy repository rather than the daisy-wiki to retrieve content
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy2html.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/locationmap.xml (props changed)
- copied unchanged from r210163, forrest/branches/locationmap_branch/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/locationmap.xml
Removed:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/repoRequest2doc.xsl
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
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/site.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=225652&r1=225651&r2=225652&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 Wed Jul 27 16:25:12 2005
@@ -35,66 +35,19 @@
<!-- ============================================================== -->
<!-- Repository pipeline -->
<!-- ============================================================== -->
- <map:pipeline>
- <map:match
- pattern="do/getRepositoryData/daisy/*/port/*/collection/*/doc/**.source.xml">
- <map:generate type="html" src="http://{1}:{2}/{3}/{4}?navigationType=none" />
- <map:serialize type="xml" />
- </map:match>
-
- <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}/daisy/preFilter.xsl"/>
- <map:transform src="{forrest:stylesheets}/html2document.xsl" />
- <map:transform src="{project:resources.stylesheets}/daisy/postFilter.xsl"/>
- <map:serialize type="xml" />
- </map:match>
-
- <map:match
- pattern="do/getRepositoryData/daisy/**/collection/*/doc/**.source.xml">
- <map:generate type="html" src="http://{1}/{2}/{3}?navigationType=none" />
- <map:serialize type="xml" />
- </map:match>
-
- <map:match
- pattern="do/getRepositoryData/daisy/**/collection/*/doc/**.xml">
- <map:generate type="html" src="http://{1}/{2}/{3}?navigationType=none" />
- <map:transform src="{project:resources.stylesheets}/daisy/preFilter.xsl"/>
- <map:transform src="{forrest:stylesheets}/html2document.xsl" />
- <map:transform src="{project:resources.stylesheets}/daisy/postFilter.xsl"/>
- <map:serialize type="xml" />
- </map:match>
- </map:pipeline>
-
- <map:pipeline>
- <map:match pattern="*.xml">
- <map:select type="request-parameter">
- <map:parameter name="parameter-name" value="repositoryType"/>
- <map:when test="daisy-wiki">
- <map:generate type="request"/>
- <map:transform src="resources/stylesheets/repoRequest2doc.xsl">
- <map:parameter name="localURL" value="{1}.xml"/>
- </map:transform>
- <map:serialize type="xml" />
+ <map:pipeline>
+
+ <map:match pattern="**.daisy.xml">
+ <map:generate src="cocoon://{1}.daisy.source" />
+ <map:transform src="resources/stylesheets/daisy2html.xsl"/>
+ <map:transform src="{forrest:stylesheets}/html2document.xsl"/>
+ <map:select type="exists">
+ <map:when test="{project:resources.stylesheets}/daisy/postFilter.xsl">
+ <map:transform src="{project:resources.stylesheets}/daisy/postFilter.xsl"/>
</map:when>
</map:select>
- </map:match>
- </map:pipeline>
-
- <map:pipeline>
- <map:match pattern="**/*.xml">
- <map:select type="request-parameter">
- <map:parameter name="parameter-name" value="repositoryType"/>
- <map:when test="daisy-wiki">
- <map:generate type="request"/>
- <map:transform src="resources/stylesheets/repoRequest2doc.xsl">
- <map:parameter name="localURL" value="{1}/{2}.xml"/>
- </map:transform>
- <map:serialize type="xml" />
- </map:when>
- </map:select>
- </map:match>
+ <map:serialize type="xml"/>
+ </map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap?rev=225652&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap Wed Jul 27 16:25:12 2005
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation or its licensors,
+ as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:pipelines>
+ <!-- ============================================================== -->
+ <!-- Repository pipeline -->
+ <!-- ============================================================== -->
+ <map:pipeline>
+ <map:match pattern="**.daisy.source">
+ <map:generate src="{lm:{0}}" />
+ <map:select type="exists">
+ <map:when test="{project:resources.stylesheets}/daisy/preFilter.xsl">
+ <map:transform src="{project:resources.stylesheets}/daisy/preFilter.xsl"/>
+ </map:when>
+ </map:select>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ <map:match pattern="**.daisy.img">
+ <map:read src="{lm:{0}}"/>
+ </map:match>
+ </map:pipeline>
+ </map:pipelines>
+</map:sitemap>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy2html.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy2html.xsl?rev=225652&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy2html.xsl (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy2html.xsl Wed Jul 27 16:25:12 2005
@@ -0,0 +1,179 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation or its licensors,
+ as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:p="http://outerx.org/daisy/1.0#publisher"
+ xmlns:ns="http://outerx.org/daisy/1.0"
+ version="1.0">
+
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title><xsl:value-of select="//ns:document/@name"/></title>
+ <xsl:apply-templates select="//p:preparedDocument/ns:document/ns:fields/ns:field"/>
+ </head>
+ <body>
+ <xsl:apply-templates select="p:page/p:publishedDocument/p:preparedDocument[@id='1']"/>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="ns:field">
+ <xsl:for-each select="ns:string">
+ <meta>
+ <xsl:attribute name="name"><xsl:value-of select="../@name"/></xsl:attribute>
+ <xsl:attribute name="content"><xsl:value-of select="."/></xsl:attribute>
+ </meta>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template match="p:preparedDocument">
+ <xsl:comment>Prepared Document: ID = <xsl:value-of select="@id"/></xsl:comment>
+ <xsl:apply-templates select="ns:document/ns:parts/ns:part"/>
+ </xsl:template>
+
+ <xsl:template match="ns:part">
+ <xsl:comment>Part: Name <xsl:value-of select="@name"/></xsl:comment>
+ <xsl:if test="@name!='SimpleDocumentContent'">
+ <h1><xsl:value-of select="@name"/></h1>
+ </xsl:if>
+ <xsl:apply-templates select="html/body"/>
+ </xsl:template>
+
+ <xsl:template match="ns:searchResult">
+ <table>
+ <xsl:apply-templates/>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="ns:titles">
+ <tr>
+ <xsl:apply-templates/>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="ns:title">
+ <td>
+ <xsl:apply-templates/>
+ </td>
+ </xsl:template>
+
+ <xsl:template match="ns:rows">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="ns:row">
+ <tr>
+ <xsl:apply-templates/>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="ns:value">
+ <td>
+ <xsl:choose>
+ <xsl:when test="position() = 1">
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="../@id"/>.daisy.html</xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </xsl:template>
+
+ <xsl:template match="body">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="p:daisyPreparedInclude">
+ <xsl:variable name="id" select="@id"/>
+ <h1><xsl:value-of select="//p:preparedDocument[@id=$id]/ns:document/@name"/></h1>
+ <xsl:apply-templates select="//p:preparedDocument[@id=$id]"/>
+ </xsl:template>
+
+ <xsl:template match="p[@class='note']">
+ <div class="frame note">
+ <div class="label">Note</div>
+ <div class="content"><xsl:apply-templates/></div>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="p[@class='fixme']">
+ <div class="frame fixme">
+ <div class="label">Fixme</div>
+ <div class="content"><xsl:apply-templates/></div>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="p[@class='warning']">
+ <div class="frame warning">
+ <div class="label">Warning</div>
+ <div class="content"><xsl:apply-templates/></div>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="a">
+ <xsl:choose>
+ <xsl:when test="starts-with(@href, 'daisy:')">
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="substring-after(@href, 'daisy:')"/>.daisy.html</xsl:attribute>
+ <xsl:attribute name="description"><xsl:value-of select="@daisyDocumentName"/></xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
+ <xsl:attribute name="description"><xsl:value-of select="@daisyDocumentName"/></xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="img">
+ <xsl:choose>
+ <xsl:when test="starts-with(@src, 'daisy:')">
+ <img>
+ <xsl:attribute name="src"><xsl:value-of select="substring-after(@src, 'daisy:')"/>.daisy.img</xsl:attribute>
+ <xsl:apply-templates/>
+ </img>
+ </xsl:when>
+ <xsl:otherwise>
+ <img>
+ <xsl:attribute name="src"><xsl:value-of select="@src"/></xsl:attribute>
+ <xsl:apply-templates/>
+ </img>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="@ns:*|ns:*"/>
+ <xsl:template match="@p:*|p:*"/>
+
+ <xsl:template match="@*|*|text()|processing-instruction()|comment()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy2html.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/locationmap.xml
------------------------------------------------------------------------------
svn:eol-style = native
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=225652&r1=225651&r2=225652&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 Wed Jul 27 16:25:12 2005
@@ -130,10 +130,6 @@
instead of processing the HTML produced by Daisy we will process
the the XML. Use with care in the meantime.</warning>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
-
<section>
<title>Example</title>
<p>To filter out the document heading of the Daisy
@@ -190,13 +186,14 @@
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>
- </ul>
- </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>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/site.xml?rev=225652&r1=225651&r2=225652&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/site.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/src/documentation/content/xdocs/site.xml Wed Jul 27 16:25:12 2005
@@ -33,7 +33,7 @@
<site label="org.apache.forrest.plugin.input.Daisy" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="">
<about label="About">
- <index label="Index" href="index.html" description="Welcome to org.apache.forrest.plugin.input.Daisy"/>
+ <index label="Index" href="index.daisy.html" description="Welcome to org.apache.forrest.plugin.input.Daisy"/>
<changes label="Changes" href="changes.html" description="History of Changes" />
<todo label="Todo" href="todo.html" description="Todo List" />
</about>