Reputation: 39
this is my problem : my image doesn't show in my PDF file.
this is my XML file :
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Devis xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="mon_fichier.xsd">
<EnTete>
<Logo>
<img>file:/C:/mon_fichier.jpg</img>
</Logo>
</EnTete>
</Devis>
This is my XSL File :
<xsl:template match="/">
...
<fo:static-content flow-name="xsl-region-before"
font-size="12pt" font-family="Times New Roman">
<fo:block>
<xsl:param name="image" select="EnTete/Logo/img" />
<fo:external-graphic src="{concat('url','(',$image,')')}"
content-height="80px" content-width="640px" />
</fo:block>
</fo:static-content>
...
</xsl:template>
Any ideas ?
thank you in advance.
FM
Upvotes: 0
Views: 928
Reputation: 3788
I see a few points that you should check:
Devis/EnTete/Logo/img
(or /Devis/EnTete/Logo/img
, or //EnTete/Logo/img
) if you want to select the image pathname in a template matching "/"url(...)
, just use <fo:external-graphic src="{$image}" content-height="80px" content-width="640px"/>
Upvotes: 1
Reputation: 2115
The path in your XML is strange: file:/C:/mon_fichier.jpg should be C:\mon_fichier.jpg
And then this should work:
fo:external-graphic src="/Devis/EnTete/Logo/img"
The xsl:param in your XSL does nothing. Why is it there?
Upvotes: 0