Thanks a lot, that did the trick. I knew there was a way to use global
parameters, but hadn't had time to look into it. Nothing speeds development
like cutting and pasting from an email straight into your code and having it
work the first time!

-Matt



> -----Original Message-----
> From: Mark Reeves [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 07, 2002 7:19 AM
> To: [EMAIL PROTECTED]
> Subject: RE: AW: FOP-XSL:dynamic external graphics
> 
> 
> Try using <xsl:param>
> 
> e.g.
> 
> <xsl:stylesheet
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 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>) ;
> transformer.transform(<src>,<dest>);
> 
> Mark
> 
> 
> Mark Reeves
> Senior Software Engineer
> CSU Ltd
> 0161 277 5240
> 
> 
> 
> 
> -----Original Message-----
> From: Matt Savino [mailto:[EMAIL PROTECTED]]
> Sent: 07 January 2002 15:02
> To: [EMAIL PROTECTED]
> 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.
> 
> -Matt
> 
> 
> 
> "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]
> 
> 


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

Reply via email to