"Romain Bertucelli" <[EMAIL PROTECTED]> wrote: > I tried to the same thing with <xsl:include > href="{concat($filepathValue,'anXSLFile.xsl')}"/> [snip] > Does anyone know if there is a way to do this ?
You can't do this. Stylesheet includes can only use statically known URIs. Actually, you probably don't need to set the URI dynamically. The URI may be a relative URL. If all your style sheets reside in the same directory, simply write href="anXSLfile.xsl" or such. More exhaustive: Generating PDF from XML using FOP is actually a two pass process. The first pass is the XSL transformation, where you apply an XSL stylesheet to the input XML to generate formatting objects, also an XML structure. The software doing the transformation is the XSLT processor, FOP comes with Xalan for this purpose. The result of the transformation is passed to the formatter, the FOP software itself, which produces the PDF. The distinction is relevant: xsl:input is an *instruction* for the XSLT processor, while <fo:external-graphic src="URI"/> is *generated* by the transformation and an instruction for the formatter. The URIs in the href respective src attribute are interpreted in different environments. For xsl:include it's the XSLT processor, which uses the base URI (the directory for files) of the stylesheet where the xsl:include instruction occurs for resolving relative URLs. The formatter may use something completely different, it may use the current directory for file URLs which may be something strange in a servlet environment, or it may use a configuration setting. With the knowledge of how relative URLs are resolved, you can get rid of any absolute filenames in your stylesheets. If you have to move between environments where absolute filenames change, a sensible organisation can save you work. Put all style sheets into one directory and use the filename as relative URL in xsl:include and xsl:import. Set the base directory for the formatter explicitely for example from a servlet configuration value and use relative URLs for images too. HTH J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]