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

RE: variable incrementing problems

Subject: RE: variable incrementing problems
From: Eugeny Kuzakov <kev@xxxxxxxxx>
Date: Tue, 29 Jun 1999 14:12:31 +0700 (OSS)
xsl variable incrementing
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) &gt; 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) &gt; 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


Current Thread

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.