You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2008/02/20 16:22:33 UTC

svn commit: r629501 - in /forrest/trunk: plugins/org.apache.forrest.plugin.output.pdf/ plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/ whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/ whiteboard/plugins/org.apache...

Author: thorsten
Date: Wed Feb 20 07:22:26 2008
New Revision: 629501

URL: http://svn.apache.org/viewvc?rev=629501&view=rev
Log:
FOR-635 Fixing remaining images. As I can tell all imgaes are working again. 

Modified:
    forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-main.ft
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap?rev=629501&r1=629500&r2=629501&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap Wed Feb 20 07:22:26 2008
@@ -40,6 +40,7 @@
                     <map:transform src="{lm:pdf.transform.document.fo}">
                         <map:parameter name="imagesdir" value="{properties:resources.images}/"/>
                         <map:parameter name="xmlbasedir" value="{properties:content.xdocs}{1}"/>
+                        <map:parameter name="path" value="{1}"/>
                     </map:transform>
                 </map:otherwise>
             </map:select>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl?rev=629501&r1=629500&r2=629501&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl Wed Feb 20 07:22:26 2008
@@ -103,6 +103,9 @@
         select="." />
   <xsl:param
         name="xmlbasedir" />
+  <xsl:param
+        name="path"
+        select="." />
   <xsl:include
         href="helper-pdfoutline.xsl" />
   <xsl:include

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl?rev=629501&r1=629500&r2=629501&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl Wed Feb 20 07:22:26 2008
@@ -357,7 +357,7 @@
           </xsl:when>
           <!-- relative to document -->
           <xsl:otherwise> 
-            <xsl:value-of select="concat('cocoon://',@src)"/> </xsl:otherwise>
+            <xsl:value-of select="concat('cocoon://',$path,@src)"/> </xsl:otherwise>
         </xsl:choose>
       </xsl:variable>
       <fo:external-graphic src="{$imgpath}">

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-main.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-main.ft?rev=629501&r1=629500&r2=629501&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-main.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-main.ft Wed Feb 20 07:22:26 2008
@@ -63,6 +63,8 @@
     <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
       <xsl:param name="config"/>
+      <xsl:param name="requestPath"/>
+      <xsl:variable name="path" select="concat($requestPath/@value,'/')"/>
       <xsl:param name="defaultVariables" select="'test.html'"/>
       <!-- left, justify, right -->
       <xsl:variable name="text-align" select="string($config/page/@text-align)"/>
@@ -72,8 +74,6 @@
       <xsl:param name="numbersections" select="'true'"/>
       <!-- page breaks after TOC and each page if an aggregate document -->
       <xsl:variable name="page-break-top-sections" select="'true'"/>
-      
-      
       <!-- prefix which turns relative URLs into absolute ones, empty by default -->
       <xsl:variable name="url-prefix" select="string($config/url-prefix)"/>
       <!-- print URL of external links -->

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml?rev=629501&r1=629500&r2=629501&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/panels/common-fo.panel.xml Wed Feb 20 07:22:26 2008
@@ -17,6 +17,8 @@
 -->
 <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
   xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+  <jx:set var="end" value="${getRequest.lastIndexOf('/')}"/>
+  <jx:set var="path" value="${getRequest.substring(0,end)}"/>
 <!-- Settings specific to PDF output. -->
   <forrest:contract name="layout-master-set">
     <forrest:property name="config">
@@ -100,6 +102,7 @@
   </forrest:contract>
   <forrest:contract name="content-main-outline" dataURI="cocoon://#{$getRequest}.toc.xml"/>
   <forrest:contract name="content-main" dataURI="cocoon://#{$getRequest}.source.rewritten.xml">
+    <forrest:property name="requestPath" value="${path}"/>
     <forrest:property name="config">
 <!-- 
         Supported text alignments are left, right, justify (default left).