|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Passing variables to xsl:include xsl:imports, and xsl:call-t
<! -- I wish I could do the following : -->
<xsl:variable
name='setOfTemplates'>"http://myXSLTSheet1.xsl"</xsl:variable>
...
<xsl:include href="{$setOfTemplates}"/>
<! -- The following would also be nice : -->
<xsl:variable name='aTemplateReference'>magic1</xsl:variable>
<xsl:template match="...a mathing expression...">
<xsl:call-template name="{$aTemplateReference}"/>
</xsl:template>
This would add polymorphism to XSL, the caller/user
of a template is not statically linked to a given
implementation, i.e. implementations could be set at runtime...
Now of course to be usefull one would need
to be able to conditionnally assign values to
{$setOfTemplates} and {$aTemplateReference} ...
ex.:
<xsl:variable name='setOfTemplates'>
<xsl:value-of select="resolver:resolveVariable('setOfTemplates')"/>
<!-- I know the specs only allow resolveVariable to be static
so a 'resolver' is not usefull ... -->
</xsl:variable>
or like in LotusXSL :
xslProcessor.setStylesheetParam("setOfTemplates",
"'http://anXSLfile.xsl'");
xslProcessor.process(...);
one can then use :
<xsl:value-of select="$setOfTemplates"/>
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
|

Cart








