You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ramon Maria Gallart <rg...@asistemas.net> on 2002/05/28 12:12:36 UTC
Image source
Hi all!
As I said yesterday in a previous message, i'm new to xml, xsl and
so on, so please be patient. Thanks.
Well, the thing is that with all the documentation gathered thanks
to all the answers i got yesterday i've been able to construct a xsl
style sheet to produce a pdf from a xml data source using FOP. Now, what
i would like to know is how can i tell xsl that i want an image whose
name is in a xml tag? For example:
in the xml.......
<img>
<name>nameOfImage.jpg</name>
</img>...
in the xsl.......
<fo:block>
<fo:external-graphic src="(here should go the name of the
image above"/>
</fo:block>...
A practical axemple or where to find it would be appreciated.
Thanks all.
Ramon.
Re: Image source
Posted by Ralf Steppacher <st...@esteam.de>.
> i would like to know is how can i tell xsl that i want an image whose
> name is in a xml tag? For example:
>
> in the xml.......
> <img>
> <name>nameOfImage.jpg</name>
> </img>...
>
> in the xsl.......
> <fo:block>
> <fo:external-graphic src="(here should go the name of the
> image above"/>
> </fo:block>...
>
You could do something like:
<xsl:template match="img">
<fo:block>
<fo:external-graphic>
<xsl:attribute name="src">
<xsl:value-of select="./name"/>
</xsl:attribute>
</fo:external-graphic>
</fo:block>
</xsl:template>
Ralf
AW: Image source
Posted by Kai Ulrich <ul...@pnpconsult.com>.
try
in the xml.......
<img>
<name>nameOfImage.jpg</name>
</img>...
in the xsl.......
<xsl:template match="img" >
<fo:block>
<fo:external-graphic src="{name}"/>
</fo:block>
</xsl:template>
In my Application it just worked with the absolut image-path ! Don't knew
why !
Greatings
kai
-----Ursprüngliche Nachricht-----
Von: Ramon Maria Gallart [mailto:rgallart@asistemas.net]
Gesendet: Dienstag, 28. Mai 2002 12:13
An: fop-user@xml.apache.org
Betreff: Image source
Hi all!
As I said yesterday in a previous message, i'm new to xml, xsl and so
on, so please be patient. Thanks.
Well, the thing is that with all the documentation gathered thanks to
all the answers i got yesterday i've been able to construct a xsl style
sheet to produce a pdf from a xml data source using FOP. Now, what i would
like to know is how can i tell xsl that i want an image whose name is in a
xml tag? For example:
in the xml.......
<img>
<name>nameOfImage.jpg</name>
</img>...
in the xsl.......
<fo:block>
<fo:external-graphic src="(here should go the name of the
image above"/>
</fo:block>...
A practical axemple or where to find it would be appreciated.
Thanks all.
Ramon.