Never write this:
when you mean this:
<xsl:variable name="temp1" select="local-name()"/>
unless you're paid for the number of lines of code you write and don't care about efficiency. The former construct is creating a result tree fragment - a pretty complex data structure with all sorts of properties like node identity, base URI, etc - when all you want is a string.
To answer your question, a lot of people seem to have trouble finding this in the specs and I've never understood why. The syntax is
<xsl:if test="$temp = 'a' or $temp = 'b'">...
In 2.0, if you prefer, you can write
<xsl:if test="$temp = ('a', 'b')">
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference