Hello Jessica,

can you view the resulting XSL FO code (serializing it with XML serializer)? Does it contain the <fo:external-graphic/>?

Furthermore you have a XSLT error:

<fo:external-graphic src="$sectioncontent" content-height="100%" content-width="100%"/>

This should create a src attribute containing the *value* "$sectioncontent". If you want to replace it with the content of $sectioncontent, change it to

src="{$sectioncontent}"

using Attribute Value Template (AVT).

Absolute paths (both http:// and file://) shell work.

Regards,

Joerg

Jessica Niewint wrote:
Hi, for me it seems to be impossible to generate a PDF with graphics.

I use (cocoon 2.0.3 with java 1.4) ...
The data come from a database (via xsp).

The variable $sectioncontent contains a path to an image (Like: http://www.myserver.com/xyz.jpg) .
In the <fo:external-graphic ...> tag I use this var to define the src (src="$sectioncontent").

<xsl:for-each select="SecContent">
<xsl:variable name="sectioncontent" select="."/>
<fo:block font-size="12pt" font-style="italic" space-after="2mm">
<xsl:if test="contains($sectioncontent, '.jpg')">
<fo:block align="center">
<!-- here external graphic -->
<fo:external-graphic src="$sectioncontent" content-height="100%" content-width="100%"/>Image here

</fo:block>
</xsl:if>
<fo:block font-size="12pt" font-style="italic" space-after="2mm">
<xsl:value-of select="." disable-output-escaping="yes"/>
</fo:block>

</fo:block>
</xsl:for-each>
</fo:block>


But no image will be displayed in the pdf file, even if I put a static path in to the <fo:external-graphic> tag : nothing !
Is there something I have to know ? Sitemap, Cocoon ???
I have to generators with html everything will be shown correctly....

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to