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/08/17 02:19:53 UTC
svn commit: r233089 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy:
resources/stylesheets/daisy2html.xsl
src/documentation/content/xdocs/index.xml
Author: rgardler
Date: Tue Aug 16 17:19:43 2005
New Revision: 233089
URL: http://svn.apache.org/viewcvs?rev=233089&view=rev
Log:
daisy 1.3 changes the http api, add experimental support for this new API (1.2 is still supported)
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy2html.xsl
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/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=233089&r1=233088&r2=233089&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy2html.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy2html.xsl Tue Aug 16 17:19:43 2005
@@ -25,11 +25,32 @@
<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"/>
+ <xsl:choose>
+ <xsl:when test="//ns:document">
+ <title><xsl:value-of select="//ns:document/@name"/></title>
+ <xsl:apply-templates select="//p:preparedDocument/ns:document/ns:fields/ns:field"/>
+ </xsl:when>
+ <xsl:when test="html">
+ <title>FIXME: get the title of the document</title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>Daisy Error</title>
+ </xsl:otherwise>
+ </xsl:choose>
</head>
<body>
- <xsl:apply-templates select="p:page/p:publishedDocument/p:preparedDocument[@id='1']"/>
+ <xsl:choose>
+ <xsl:when test="p:page">
+ <xsl:apply-templates select="p:page/p:publishedDocument/p:preparedDocument[@id='1']"/>
+ </xsl:when>
+ <xsl:when test="html">
+ <xsl:apply-templates select="//body"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <h1>Daisy Error</h1>
+ <p>Unable to transform the daisy document.</p>
+ </xsl:otherwise>
+ </xsl:choose>
</body>
</html>
</xsl:template>
@@ -154,12 +175,14 @@
<xsl:choose>
<xsl:when test="starts-with(@src, 'daisy:')">
<img>
+ <xsl:apply-templates select="@*"/>
<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:apply-templates select="@*"/>
<xsl:attribute name="src"><xsl:value-of select="@src"/></xsl:attribute>
<xsl:apply-templates/>
</img>
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=233089&r1=233088&r2=233089&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 Tue Aug 16 17:19:43 2005
@@ -52,6 +52,11 @@
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>
+
+ <warning>The HTTP API in Daisy 1.3 has changed. The code below is for
+ Daisy 1.2. We currently have experimental support for Daisy 1.3, if you
+ wish to work with this version of daisy you should discuss your needs with
+ the Forrest mail lists.</warning>
<source><![CDATA[
<locationmap xmlns="http://apache.org/forrest/locationmap/1.0">