|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] using <xsl:variable>
Hello,
I have a variable whose value I need to increment by 1 every time the template is called. i.e. I have an element called <figure> in which I have defined a variable called "fig". I need to increment the value of fig every time <figure> is called. I initially used the following instructions: <xsl:template match="figure"> <xsl:variable name="fig" select="($fig+1)"/> <xsl:value-of select="$fig"/> ------ </xsl:template> However when I saw the output, all the fig values were displayed as 1. I realized that since fig was a local variable, it was being initialized each time the <figure> template was being called. I need to find a way to "remember" the previous value of fig each time <figure> is called, something similar to "$fig=$fig + 1". Is it possible to write such an expression? Hope someone can help. Thanks a lot, Dhruv _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. 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








