A global variable is an alias association for a type and its value. Instead of using the function nodeValue("xpath") you may then use the global variable instead.
As an example. If you want to calculate a price like this:
nodeValue("/purchaseOrder/item/quantity") * nodeValue("/purchaseOrder/item/price")
You may use the following syntax after you have defined two global variables:
quantity * price