Another variable question

Subject: Another variable question
From: Christian NENTWICH <C.Nentwich@xxxxxxxxxxxx>
Date: Thu, 03 Jun 1999 17:54:39 +0100
Dear all,

a little newbie question that can be answered quickly. I have searched 
through the digest and didn't find an answer.

Suppose a have a global variable like this:

   <xsl:variable name="current_x">20</xsl:variable>

I want to use that variable to keep track of coordinates.. every time I
encounter a certain element, I want to increase it (I cannot use counters
for this purpose because I  will have to do other operations in the future),
e.g.

 <xsl:template match="whatever">
     <xsl:variable name="current_x" expr="$current_x+25"/>  
 </xsl:template>

The problem is (maybe similar to a previous posting anyway) that I now
create a new variable that has the value 45 but I have not changed the
global.

Thanks,
Christian


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread