forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel GAY <>
Subject PDF - image generation fails when images not in resource/images directory
Date Fri, 05 Jun 2009 09:25:15 GMT

I'm using forrest 0.8. in the document-to-fo.xsl, there's following code:

<!-- resources image dir -->
           <xsl:when test="starts-with(string(@src),'images/')">
           <xsl:when test="contains(string(@src),'/images/')">

<!-- already absolute -->
           <xsl:when test="contains(string(@src),':') or 
             <xsl:value-of select="@src"/>

<!-- relative to document -->
             <xsl:value-of select="concat($xmlbasedir,@src)"/>
       <fo:external-graphic src="{$imgpath}">
         <xsl:if test="@height">
           <xsl:attribute name="height">
             <xsl:value-of select="@height"/>
         <xsl:if test="@width">
           <xsl:attribute name="width">
             <xsl:value-of select="@width"/>

the first part causes trouble when the images happen not to be in the 
resource folder, but in an "images" folder (e.g. in 
/content/xdocs/images), i.e. "fo:external-graphic" gets a wrong src value.

commenting out this part did the trick for me - but I do wonder

1/ what is the rationale behind having images in the resource/ folder?

2/ if I wanted to have all my images in resource/images rather than in 
content/xdocs/images, (how) would I still be able to include the images 
in the site?

3/ are there any plans to simplify the default forrest folder structure 
a bit? right now, it looks quite complex. I recognize that many folders 
are necessary to allow for customization, yet I believe those do not 
necessarily need to be created by a "forrest seed" from a user point of 
view (to name a few: translations, resources, conf and classes do not 
seem to give much added value on the first sight)



View raw message