You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gk...@apache.org on 2008/07/09 18:05:18 UTC

svn commit: r675242 - /cocoon/trunk/tools/cocoon-daisy-export-strategy/src/main/resources/org/apache/cocoon/tools/maven/daisy/export/strategy/cocoon-doc-2-xdoc.xslt

Author: gkossakowski
Date: Wed Jul  9 09:05:18 2008
New Revision: 675242

URL: http://svn.apache.org/viewvc?rev=675242&view=rev
Log:
Fixed cocoon-doc-2-xdoc.xslt bugs that made it fail with Saxon.

Apart from small bug-fixes, new template for p:* elements has been introduced to supress any elements from Daisy coming to the output.

Modified:
    cocoon/trunk/tools/cocoon-daisy-export-strategy/src/main/resources/org/apache/cocoon/tools/maven/daisy/export/strategy/cocoon-doc-2-xdoc.xslt

Modified: cocoon/trunk/tools/cocoon-daisy-export-strategy/src/main/resources/org/apache/cocoon/tools/maven/daisy/export/strategy/cocoon-doc-2-xdoc.xslt
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-daisy-export-strategy/src/main/resources/org/apache/cocoon/tools/maven/daisy/export/strategy/cocoon-doc-2-xdoc.xslt?rev=675242&r1=675241&r2=675242&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-daisy-export-strategy/src/main/resources/org/apache/cocoon/tools/maven/daisy/export/strategy/cocoon-doc-2-xdoc.xslt (original)
+++ cocoon/trunk/tools/cocoon-daisy-export-strategy/src/main/resources/org/apache/cocoon/tools/maven/daisy/export/strategy/cocoon-doc-2-xdoc.xslt Wed Jul  9 09:05:18 2008
@@ -220,10 +220,10 @@
           </div>
           <div id="gettingDownload">
             <div class="downloadVersion">
-              <xsl:copy-of select="d:parts/d:part[@typeId='2']/html/body//p[contains(@id,'gettingDownloadText1')]"/>
+              <xsl:apply-templates select="d:parts/d:part[@typeId='2']/html/body//p[contains(@id,'gettingDownloadText1')]"/>
             </div>
             <div class="moreDownload">
-              <xsl:copy-of select="d:parts/d:part[@typeId='2']/html/body//p[contains(@id,'gettingDownloadText2')]"/>
+              <xsl:apply-templates select="d:parts/d:part[@typeId='2']/html/body//p[contains(@id,'gettingDownloadText2')]"/>
             </div>
           </div>
         </div>
@@ -243,7 +243,7 @@
         <xsl:with-param name="filePath" select="concat('flash/', @id, '_', @branchId, '_', @languageId, '.swf')"/>
       </xsl:apply-templates>
       <xsl:apply-templates select="d:fields/d:field[starts-with(@name, 'MultiMediaObject') and
-        ((@name != 'MultiMediaObjectHeight') or (@name != 'MultiMediaObjectWidth')) ]" mode="object"/>
+        ((@name != 'MultiMediaObjectHeight') and (@name != 'MultiMediaObjectWidth')) ]" mode="object"/>
       <embed>
         <xsl:apply-templates select="d:parts/d:part[@name = 'MultiMediaData']" mode="embed">
           <xsl:with-param name="filePath" select="concat('flash/', @id, '_', @branchId, '_', @languageId, '.swf')"/>
@@ -259,16 +259,16 @@
     +-->
   <xsl:template match="d:part" mode="object">
     <xsl:param name="filePath"/>
+    <xsl:attribute name="type">
+      <xsl:value-of select="@mimeType" />
+    </xsl:attribute>
     <xsl:choose>
       <xsl:when test="@mimeType = 'application/x-shockwave-flash'">
         <xsl:attribute name="classid">clsid:D27CDB6E-AE6D-11cf-96B8-444553540000</xsl:attribute>
         <xsl:attribute name="codebase">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0</xsl:attribute>
         <param name="movie" value="{$filePath}"/>
       </xsl:when>
-    </xsl:choose>   
-    <xsl:attribute name="type">
-      <xsl:value-of select="@mimeType" />
-    </xsl:attribute>
+    </xsl:choose>
   </xsl:template>
   
   <xsl:template match="d:part" mode="embed">
@@ -475,6 +475,11 @@
       <strong style="color:red;font-weight:bold">Warning: There is no styling for this query available.</strong>
     </div>
   </xsl:template>
+  
+  <!-- Suppress any p:* elements from the output but still process child elements -->
+  <xsl:template match="p:*">
+    <xsl:apply-templates/>
+  </xsl:template>
 
   <!--+
        | default templates