forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/skins/common/xslt/fo document2fo.xsl
Date Thu, 27 Mar 2003 03:53:47 GMT
jefft       2003/03/26 19:53:47

  Modified:    .        status.xml
               src/resources/conf cocoon.xconf sitemap.xmap
               src/resources/skins/common/xslt/fo document2fo.xsl
  Log:
  Get images in PDF working, by making all image paths absolute
  
  Revision  Changes    Path
  1.141     +7 -0      xml-forrest/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/status.xml,v
  retrieving revision 1.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- status.xml	26 Mar 2003 15:35:14 -0000	1.140
  +++ status.xml	27 Mar 2003 03:53:46 -0000	1.141
  @@ -24,6 +24,13 @@
   
     <changes>
       <release version="0.5-dev" date="unreleased">
  +      <action dev="JT" type="fix" context="core">
  +        Get images in PDFs working with FOP 0.20.x.  This requires the user to
  +        download jimi.jar from <link
  +          href="http://java.sun.com/products/jimi/">Sun</link> and place it in
  +        the <code>lib/core</code> (src distro) or <code>WEB-INF/lib</code>
  +        (binary distro) directory.
  +      </action>
         <action dev="NKB" type="fix" context="skins">
          On krysalis skin: fixed print css, also using text instead of
          logos and adding the footer, and changed link colors to blues and
  
  
  
  1.17      +3 -0      xml-forrest/src/resources/conf/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/cocoon.xconf,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- cocoon.xconf	24 Mar 2003 21:20:16 -0000	1.16
  +++ cocoon.xconf	27 Mar 2003 03:53:46 -0000	1.17
  @@ -56,6 +56,9 @@
     <input-modules>
       <component-instance class="org.apache.cocoon.components.modules.input.GlobalInputModule"
logger="core.modules.input" name="global"/>
       <component-instance class="org.apache.cocoon.components.modules.input.RequestModule"
logger="core.modules.input" name="request"/>
  +    <component-instance
  +      class="org.apache.cocoon.components.modules.input.RealPathModule"
  +      logger="core.modules.input" name="realpath"/>
       <component-instance class="org.apache.cocoon.components.modules.input.SessionModule"
logger="core.modules.input" name="session"/>
       <component-instance class="org.apache.cocoon.components.modules.input.RequestParameterModule"
logger="core.modules.input" name="request-param"/>
       <component-instance class="org.apache.cocoon.components.modules.input.RawRequestParameterModule"
logger="core.modules.input" name="raw-request-param"/>
  
  
  
  1.85      +5 -3      xml-forrest/src/resources/conf/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- sitemap.xmap	24 Mar 2003 03:17:01 -0000	1.84
  +++ sitemap.xmap	27 Mar 2003 03:53:46 -0000	1.85
  @@ -158,9 +158,11 @@
           </map:call>
         </map:match>
   
  -      <map:match pattern="**.pdf">
  -        <map:generate src="cocoon:/{1}.xml"/>
  -        <map:transform src="skins/{forrest:skin}/xslt/fo/document2fo.xsl"/>
  +      <map:match type="regexp" pattern="(.*?)([^/]*).pdf">
  +        <map:generate src="cocoon:/{1}{2}.xml"/>
  +        <map:transform src="skins/{forrest:skin}/xslt/fo/document2fo.xsl">
  +          <map:parameter name="basedir" value="{realpath:resources}/"/>
  +        </map:transform>
           <map:serialize type="fo2pdf"/>
         </map:match>
   
  
  
  
  1.7       +5 -2      xml-forrest/src/resources/skins/common/xslt/fo/document2fo.xsl
  
  Index: document2fo.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/common/xslt/fo/document2fo.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- document2fo.xsl	10 Feb 2003 06:26:00 -0000	1.6
  +++ document2fo.xsl	27 Mar 2003 03:53:47 -0000	1.7
  @@ -5,7 +5,7 @@
                   version="1.0">
   
     <xsl:output method="xml"/>
  - 
  +  <xsl:param name="basedir" select="'file:'"/>
     <xsl:include href="pdfoutline.xsl"/>
     <xsl:include href="footerinfo.xsl"/>
   
  @@ -501,7 +501,10 @@
         <xsl:if test="normalize-space(@id)!=''">
             <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
         </xsl:if>
  -      <fo:external-graphic src="{@src}" content-width="scale-to-fit"
  +
  +      <!-- Make relative paths absolute -->
  +      <xsl:variable name="imgpath" select="concat($basedir, @src)"/>
  +      <fo:external-graphic src="{$imgpath}" content-width="scale-to-fit"
                              content-height="scale-to-fit" max-width="100%">
           <xsl:if test="@height">
             <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
  
  
  

Mime
View raw message