[xsl] (Basic Question) Increment value of...a variable???

Subject: [xsl] (Basic Question) Increment value of...a variable???
From: Oscar <oscar.celma@xxxxxxxxxx>
Date: Fri, 30 May 2003 18:15:11 +0200

here's a basic question (which I couldn't find any info neither on the net nor looking into this mailing list archive).

The (programming) idea is to get a global variable and to modify its value, something like:

int globalScore = 0;
if ( isAnswerRight(currentAnswer) )


In more detail:

+ XML data:
<respcondition title="Correct">
<varequal respident="TF01">True</varequal>
<setvar action="Add">1</setvar>
<displayfeedback feedbacktype="Response" linkrefid="Correct"/>

<xsl:if test="resprocessing/respcondition/conditionvar/varequal/@respident='TF01'"><b>Question 1</b>
<xsl:when test="resprocessing/respcondition/conditionvar/varequal='True'">
-- Here increment SCORE GLOBAL VALUE...
<xsl:value-of select="$SCORE+1"></xsl:value-of> (???)

So, it seems $SCORE can't be declared as a variable (if I'm not wrong, xsl-variable's are like 'static const', isn't it?)

Thanx very much in advance!!!


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

Current Thread