[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Scope of a variable

Subject: RE: Scope of a variable
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 17 Mar 2000 16:58:33 -0000
xsl apply template passing variable
Look in the spec for xsl:param and xsl:with-param: they allow you to pass
parameters from the calling template to the called template. See below.
Alternatively, in this case the value is in the source document, so you can
access it from the match="FIRST" template using select="../@num".

Mike Kay

> > 
> > <xsl:template match="MAINTAG">
 > 	<xsl:apply-template select="FIRST">
		<xsl:with-param name="num" select="@num"/>
      </xsl:apply-templates>
> > </xsl:template>
> > 
> > <xsl:template match="FIRST">
	<xsl:param name="num"/>
> > 	<INPUT TYPE="HIDDEN" NAME="hidNum">
> > 	<xsl:attribute name="VALUE">
> > 	<xsl:value-of select="$num"/>
> > 	</xsl:attribute>
> > 	<xsl:apply-templates/>
> > <xsl:template>
> > 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • Scope of a variable
    • prasadm - Fri, 17 Mar 2000 09:09:04 -0600
      • <Possible follow-ups>
      • Kay Michael - Fri, 17 Mar 2000 16:58:33 -0000 <=

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.