Given
An XSLT stylesheet with a global variable:
Variables are not allowed to be used in match expressions in XSLT 1.0.
From the XSLT 1.0 specification: Defining Template Rules
It is an error for the value of the match attribute to contain a VariableReference.
Variables are allowed in match expressions in XSLT 2.0.
From the XSLT 2.0 specification: Syntax of Patterns
Patterns may start with an id FO or key function call, provided that the value to be matched is supplied as either a literal or a reference to a variable or parameter, and the key name (in the case of the key function) is supplied as a string literal. These patterns will never match a node in a tree whose root is not a document node.