|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to define a global parameter and change its va
Chi Lin wrote:
I would like to use a value from one of my template to pass to a different template. You can do it, sure.
Oh boy :) There isn't assignment operator in xslt. I can assign the value for the parameter in the template, but the following template can not pick the changed value. It can do it, just declare parameter in the second template and pass param's value from the first template. <xsl:template match="chapter"> <xsl:apply-templates select="para"> <xsl:with-param name="myParam" select="2"/> <xsl:apply-templates> </xsl:tempalte> <xsl:template match="para"> <xsl:param name="myParam" select="0"/> ... </xsl:tempalte> It still contains the original value that I have initialized. If you pass param's value by applying templates that value may be lost in bult-in templates, be aware abot it. It seems to me that the "global parameter" does not really work, the local one is always "shadow" the global one. That's right.
No way. -- Oleg Tkachenko Multiconn International, Israel 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
|

Cart








