[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

Subject: Passing variables to xsl:include xsl:imports, and xsl:call-template (or the static nature of XSL)
From: "Maxime Levesque" <maximel@xxxxxxxxxxxxxx>
Date: Thu, 15 Jul 1999 14:04:36 -0700
call maxime

<! -- 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.