Right-click an existing node in the target tree (not grayed/italicized) and select Add XSL Instruction > variable from the context menu that appears.
The Variable dialog appears.
Enter a name for the variable, and an optional namespace and prefix if desired.
Click OK.
The variable is added to the target tree, just above the node that you selected.
The variable also appears in the source tree within the Variables folder. This enables you to map from the variable to XPath expressions or nodes in the target tree.
To determine if the variable is in scope for a particular XSLT node or XPath expression, select the target tree node or XPath expression. If the variable is in scope for the target tree node or XPath expression, then the variable appears in bold in the source tree. If the variable is not in scope for the selected target tree node or XPath expression, then the variable appears disabled in the source tree.
Only scalar variables can be defined. You cannot define the structure of a variable. If the variable you are referencing represents a complex structure, you can reference nodes within the structure by entering the appropriate XPath expression manually.