Hi,

In Daisy 1.5 (currently in development), there is a small change in the
publisher output format. I have attached a patch which adjusts the
daisy-to-html.xsl of Forrest to support both the old and new format.

The change is that now a new publisher request is executed for each
prepared document, causing a move of

p:preparedDocuments/p:preparedDocument/d:document
to
p:preparedDocuments/p:preparedDocument/p:publisherResponse/d:document

It is easy to support either format simply by testing for the existence
of the d:document, as I've done in the attached patch.

I did not try this patch by running Forrest, but tried it from the
command line with the old and new input and it seems to work just fine.

                               - o -

I'm interested in seeing this applied to Forrest as Cocoon's
documentation is published via Forrest from Daisy, and I'd like to
update Cocoon's Daisy instance to a new release soon. Therefore, I'd
also like to request if someone could look into updating that file on
the Forrest zone.

Thanks in advance,

Bruno.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]
Index: whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy-to-html.xsl
===================================================================
--- whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy-to-html.xsl	(revision 381741)
+++ whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/daisy-to-html.xsl	(working copy)
@@ -42,7 +42,7 @@
         <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:apply-templates select="//p:preparedDocument//ns:document/ns:fields/ns:field"/>
           </xsl:when>
           <xsl:when test="$rootElementName = 'html'">
             <title><xsl:value-of select="html/head/title"/></title>
@@ -80,7 +80,16 @@
   
   <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"/>
+    <!-- Test whether the p:preparedDocument contains directly a ns:document (up to Daisy 1.4)
+         or a new publisherResponse (from Daisy 1.5). -->
+    <xsl:choose>
+      <xsl:when test="ns:document">
+        <xsl:apply-templates select="ns:document/ns:parts/ns:part"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="p:publisherResponse/ns:document/ns:parts/ns:part"/>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
   
   <xsl:template match="ns:part">
@@ -141,7 +150,19 @@
 
   <xsl:template match="p:daisyPreparedInclude">
     <xsl:variable name="id" select="@id"/>
-    <h1><xsl:value-of select="//p:[EMAIL PROTECTED]/ns:document/@name"/></h1>
+    <xsl:variable name="preparedDocument" select="//p:[EMAIL PROTECTED]"/>
+    <h1>
+      <!-- Test whether the p:preparedDocument contains directly a ns:document (up to Daisy 1.4)
+           or a new publisherResponse (from Daisy 1.5). -->
+      <xsl:choose>
+        <xsl:when test="$preparedDocument/ns:document">
+          <xsl:value-of select="$preparedDocument/ns:document/@name"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$preparedDocument/p:publisherResponse/ns:document/@name"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </h1>
     <xsl:apply-templates select="//p:[EMAIL PROTECTED]"/>
   </xsl:template>