xml - Using dynamic href in XSLT import/include? -
the <xsl:import>
, <xsl:include>
elements seem behave quite specific. trying do:
<xsl:import href="{$base}/themes/{/settings/active_theme}/styles.xsl" />
i want allow loading different themes application. have settings in app stores "currently active theme" folder name in xml node. unfortunately code above won't work. know workaround achieve want do?
edit: confirmed xslt guru via twitter... there's no nice way of doing this. easiest solution in case seperate frontend , backend stylesheets , load them individually xsltprocessor...
xsl:import assembles stylesheet prior execution. stylesheet can't modify while executing, trying achieve.
if have 3 variants of stylesheet use in different circumstances, represented 3 modules a.xsl, b.xsl, , c.xsl, instead of trying import 1 of these module common.xsl contains common code, need invert structure: each of a.xsl, b.xsl, , c.xsl should import common.xsl, , should select a.xsl, b.xsl, or c.xsl principal stylesheet module when initiating transformation.
Comments
Post a Comment