[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: variable incrementing problems
On Mon, 28 Jun 1999, Kay Michael wrote: > You cannot use xsl:variable to assign a new value to an existing variable: > what your code is doing is to create a new variable of the same name, and > when this goes out of scope (at </xsl:if>) your code picks up the earlier > variable in preference. Ok. Thanks for answer. I am solved my problem now. But how can I increment value already existing variable? Another question: I am declare variable (DebubOpts) in template that should match root element. This template call another templates. But there is no variable DebugOpts in "child's" templates that called from main template....?? > Try this: > > <xsl:variable name="FolderRowSpan1"> > <xsl:choose> > <xsl:when test="count(highligth)+count(subfolder/highligth) > 0"> > 1</xsl:when> > <xsl:otherwise>0</xsl:otherwise> > </xsl:choose> > <xsl:variable name="FolderRowspan"> > <xsl:value-of select="count(subfolder)*2 + 1 + > $FolderRowSpan1"/> > </xsl:variable> I am tryed this: <xsl:variable name="FolderRowSpan"> <xsl:choose> <xsl:when test="count(highligth)+count(subfolder/highligth) > 0"> <xsl:value-of select="count(subfolder)*2 + 2"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="count(subfolder)*2 + 1"/> </xsl:otherwise> </xsl:choose> </xsl:variable> -- Best wishes, Eugeny Kuzakov Laboratory 321 ( Omsk, Russia ) kev@xxxxxxxxx ICQ#: 5885106 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
|