Subject: Re: [xsl] Increment/decrement a variable in XSL From: Petr Cimprich <petr@xxxxxxxxxxxx> Date: Wed, 03 Apr 2002 15:03:39 +0200 |
Hi Shaik,
I am trying to compare user entered answers with the actual answers.
If it matches increment the number.
Is it possible to increment or decrement a variable in XSL ?
No. Variables in XSLT can't be "updated".
There are two possible ways that you could achieve what you're after.
First, it might be possible to construct a path that locates all the correct answers and for you to count them using the count() function. Alternatively, you'll need to step through the answers one by one using a recursive template and passing a parameter, which you "update" to keep count of how many of the answers are correct.
If you need help with either of those, please give an example of your source XML document and the result that you want from it.
Cheers,
Jeni
--- Jeni Tennison http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
-- Petr Cimprich Ginger Alliance www.gingerall.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Increment/decrement a va, Jeni Tennison | Thread | Re: [xsl] Increment/decrement a va, Jeni Tennison |
RE: [xsl] XML-QL, Michael Kay | Date | Re: [xsl] Increment/decrement a va, Jeni Tennison |
Month |