[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: access of a param
How can access the value of a parameter, which is within some template...The following example shows how the templates are called with parameters and how they are received at the called template.. note that the variable can be passed as a parameter to another template <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:variable name="myVar" select="'1'"/> <xsl:apply-templates select="/myroot/myElement"> <xsl:variable <xsl:with-param name="myParam" select="$myVar"/> </xsl:apply-templates> </xsl:template> <xsl:template match="myElement"> <xsl:param name="myParam"/> **Param Value** <xsl:value-of select="$myParam"/><br/> </xsl:template> </xsl:stylesheet> Hope this helps Vasu From: aruniima.chakrabarti@xxxxxxxxxxxxxxxxxx Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: access of a param Date: Tue, 6 Aug 2002 19:59:53 +0530 _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx 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
|