XSLT is a purely functional language, which means it has no way of assigning to variables. There's a chapter in my book explaining why this is a good thing and how you need to change your programming habits to adapt.
What you can do is to pass parameters to a template when you call it.
If you explain the problem you are trying to solve, rather than the invalid code you are trying to write, we may be able to help you.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference