Try using <xsl:param>


    xmlns:xsl=""; version="1.0">

<xsl:output ...>

<xsl:param name="filepathValue"/ >

 <fo:external-graphic src="{concat($filepathValue,'anImage.gif')}" />

Then in your code to do the transform, use ( for TRAX)

transformer.setParameter("filepathValue", <the path read from properties
file>) ;


Mark Reeves
Senior Software Engineer
0161 277 5240

-----Original Message-----
From: Matt Savino [mailto:[EMAIL PROTECTED]]
Sent: 07 January 2002 15:02
Subject: Re: AW: FOP-XSL:dynamic external graphics

My problem is that I need to change the filepath between environments.
(NT and Unix). In all of my Java/JSP code I use an environment-level
(Weblogic domain-level) properties file for any values that must change
from across environments and which I haven't figured out a way to get by
with something relative (IE - absolute URL prefix for HTTPS redirects,
absolute filepath to the XSLT stylesheets, etc.). 

The problem is I have no idea how to get Xalan to read properties from
this file, or in any way be aware of it's own context.  So I manually
change the image source path everytime I upload a build to the Unix box.
Not a big deal for me right now since I only have one image in all of my
reports. But I imagine it could be a pain if you had a lot more.


"Beer, Christian" wrote:
> Hello!!
> Well, try this one:
> <fo:external-graphic src="{$filepathValue}" />
> "{" and "}" are kind of escape-chars, that tell xalan to process their
> content.
> You can also do this, I think, if you only need the filename one time.
> <fo:external-graphic
> src="{concat('file:../default/tra-app/images/',client/id,'logo.gif')}" />
> Greetz
> Christian

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to