I need to grab a couple of images and put them into pdf generated via Apache FOP. Outside of eXist, I have no problems. With eXist, the template does not work properly, there is no image in the output—maybe there is a problem with paths.
The structure of “files” is:
project/data/file.xml
project/data/img/*pictures.jpg
Testing sources:
<figure>
<graphic url="img/tealover.jpg"/>
</figure>
<figure>
<graphic url="./img/tealover.jpg"/>
</figure>
<figure>
<graphic url="/db/apps/karolinum-apps/data/img/tealover.jpg"/>
</figure>
Template:
<xsl:template match="tei:figure/tei:graphic">
<fo:block>
<fo:external-graphic src="{@url}" xsl:use-attribute-sets="images"/>
</fo:block>
<xsl:apply-templates/>
</xsl:template>
Where could be the problem? Am I missing some setting of eXist? When collecting images during ePub production, there is no problem with this.
UPDATE
XSL-FO output:
<fo:block>
<fo:external-graphic width="50%" content-height="100%" content-width="scale-to-fit" scaling="uniform" src="img/tealover.jpg"/>
</fo:block>
<fo:block>
<fo:external-graphic width="50%" content-height="100%" content-width="scale-to-fit" scaling="uniform" src="./img/tealover.jpg"/>
</fo:block>
<fo:block>
<fo:external-graphic width="50%" content-height="100%" content-width="scale-to-fit" scaling="uniform" src="/db/apps/karolinum-apps/data/img/tealover.jpg"/>
</fo:block>