RE: using variable in xsl:include ?
> is it possible to use a variable in xsl:include like e.g. > <xsl:variable name="home_directory" > select="document('../../XML/config.xml')//iese.config:home_dir > ectory"/> > <xsl:include > href="concat('file://',$home_directory,'class/Person/XSL/perso > n_short.xs > l')"/> > > This example does not work! Does anyone know why? The parser > says something like wrong syntax for pathnames,... Any suggestions? xsl:include must be able to be resolved at compile time, so it cannot come from a variable. The usual technique here is to put the variable code into stylesheets that import the common code, rather that have a stylesheet that imports stylesheets based on the variable. Currently you are trying to do: A / | \ / | \ B C D Where A imports B, C, or D based on some variable. Whereas you want to do: B C D \ | / \ | / A Where B, C, or D imports A. You can then decide which stylesheet to apply to your source (b c or d) based on the variable. cheers andrew XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format