This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: parameter from a child template?
- From: "Najmi, Jamal" <Jamal dot Najmi at Artesia dot com>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 26 Apr 2002 10:12:10 -0400
- Subject: RE: [xsl] parameter from a child template?
- Reply-to: xsl-list at lists dot mulberrytech dot com
Try this:
<xsl:template match="/" >
...
<xsl:apply-templates select="/root/TEMP1"/>
</xsl:template>
<xsl:template match="TEMP1" >
...
<xsl:variable name="var" value="TEM"/>
<xsl:call-template name="TEMP2">
<xsl:with-param name="your_parameter_name" select="$var"/>
</call-template>
</xsl:template>
<xsl:template match="TEMP2" >
<xsl:param name="your_paramter_name"/>
<xsl:value-of select="your_parameter_name"/>
</template>
Jamal
-----Original Message-----
From: longjohn [mailto:longjohn@katamail.com]
Sent: Friday, April 26, 2002 2:56 PM
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] parameter from a child template?
How to pass a parameter from a CHILD template to another template?
Example:
<xsl:template match="/" >
...
<xsl:apply-templates select="/root/TEMP1"/>
</xsl:template>
<xsl:template match="TEMP1" >
...
<xsl:variable name="var" value="TEM"/>
<xsl:call-template name="TEMP2"/>
</xsl:template>
<xsl:template match="TEMP2" >
<xsl:value-of select="$var"/> <!-- $var not found !!!!!! -->
.....
Thanks!
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list