Rachael Blank <[EMAIL PROTECTED]> wrote:
> Is there a way I can dynamically display images based on an xml tag that
> I am given?
[...]
> I thought something like this would work:
> <fo:table-cell>
> <fo:block
> white-space-collapse="true">
> <xsl:variable name="filepathValue"
> > select="concat('file:../default/tra-app/images/',client/id,'logo.gif')"
> />
> <fo:external-graphic src="$filepathValue" />
Try
<fo:external-graphic src="{$filepathValue}"/>
here. Attributes of literal elements are by default literal,
this means, you generated literally
<fo:external-graphic src="$filepathValue"/>
in the output, which is of course not an URL.
Enclosing stuff in {} makes it an "attribute value template",
the stuff within is evaluated as XPath expression. You may also
have parts of an attribute be an AVT, like
<fo:external-graphic src="file:../default/tra-app/images/{client/id}logo.gif"/>
As a last hint, if every time you get mysterious errors
for invalid attribute values, it pays off to invoke the
XSLT transformation separately and examine the intermediate
FO directly.
HTH
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]