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 > > -----Ursprüngliche Nachricht----- > Von: Rachael Blank [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 4. Januar 2002 18:46 > An: [EMAIL PROTECTED] > Betreff: FOP-XSL:dynamic external graphics > > Hello and thanks in advance for your help! > > Is there a way I can dynamically display images based on an xml tag that > I am given? > > I receive the following xml: > <client> > <id></id> > ... > </client> > > I currently have the following uri specification and it works: > <fo:external-graphic src="file:../default/tra-app/images/chclogo.gif"/> > > I need the image name (chclogo.gif) to change depending on the > <client><id>a number</id></client> that I receive in the xml. > > 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" /> > <xsl:value-of select="$filepathValue" /><!--Error checking--> > </fo:block> > </fo:table-cell> > > I am receiving the following error with the above code: > Error while creating area : Invalid Image URL - error on relative URL : > java.lang.NullPointerException > > I am sure that I have the correct path (because the $filepathValue > displays correctly on the screen via my value-of select statement), but > I am thinking it is not possible to pass a variable into the src element > of the fo:external-graphic statement. I also made sure this image is > correctly named and in the appropriate directory. > > Any thoughts or alternatives, anyone? > > Thanks! > > Rachael > > Can I > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]