It works pretty much like any other programming language; testing to see whether an element is in a list and testing to see if two strings are equal are different operations in all languages that I know.
So not this:
because that tests to see if two strings are equal. Try this instead:
(I leave it to you to extend that to the whole list of magic numbers.
However... if you can get the list of magic numbers into an XSLT nodeset, then you can use the fact that asking if something is "equal to" that nodeset is equivalent to asking if that something is a member of the nodeset.