>how to change variable values ?
No – this is not possible.
When XSL was being designed, this question came up frequently. It was decided that the advantages of having a side-effects free language (i.e. without the ability to change the value of variables once the stylesheet has gone through the parser) outweighed the annoyance of old school programmers (who are used to changing the value of variables).
[DC: a small clarification, xsl variables are not "compile time constants" they do not get their values at compile/parse time, as normally they get their values at the time a template is applied to a node in the source tree, at run time. But once bound, their value doesn’t change, and the scope of the binding does not extend beyond the current template.]
Basically, if you parse once and only once, and ban any changes to the stylesheet, you will get (in theory) much faster processing.