This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Passing a parameter from one matched template to another
- From: "paul morgan" <pmorg at lycos dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 14 May 2002 15:36:14 -0700
- Subject: [xsl] Passing a parameter from one matched template to another
- Organization: Lycos Mail (http://www.mail.lycos.com:80)
- Reply-to: xsl-list at lists dot mulberrytech dot com
Is it possible to pass a parameter from one matched template to another?
That is, with the following:
<xsl:variable name="input"><ARE><YOU><NUTS></xsl:variable>
<xsl:apply-templates select="vendor:node-set($input)" />
I'd like each template that is matched to pass along a value (as determined by the matched template) to the next template that is matched.
<xsl:template match="ARE">
<xsl:param name="x" select="''"/>
<!-- create some value that should be accessed by the
next template matched -- in my example, "YOU" -->
</xsl:template>
<xsl:template match="YOU">
<xsl:param name="x" select="''"/>
<!-- create some value that should be accessed by the
next template matched -- in my example, "NUTS" -->
</xsl:template>
<xsl:template match="NUTS">
<xsl:param name="x" select="''"/>
<!-- whatever -->
</xsl:template>
Thanks,
Paul
________________________________________________________
Outgrown your current e-mail service?
Get a 25MB Inbox, POP3 Access, No Ads and No Taglines with LYCOS MAIL PLUS.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list