I'm making a PDF from an XMl doc using XSL-FO. I need to import images using their names that are inside the XML doc.
Example XML:
<newAlbums>
<album cover="blaimage.jpg"/>
</newAlbums>
I need to do this through a similar statement:
<fo:external-graphic src="({})/>
What XPath do I need to put inside the src attribute to import the image? Thanks for the help this has been killing me.
It will basically be <fo:external-graphic src="{concat('url(', /newAlbums/album/@cover, ')')}">. The exact XPath expression will depend on your XML. For example, you will most likely have more than one album element, so /newAlbums/album[1]/@cover or similar will be required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With