I like those roundy brackets better than angle ones. I'm unqualified to judge. That seems to me to be much more complicated. As I note above, I'm uncomfortable with variables of this type in a variable rich environment. If I'm still not clear after this one I'm prepared to drop my objections.
Variables seem like a kludge looking for elegance.
So it seems to me natural and easy to specify a stack. But I'm open to other possibilities, like passing in a Dictionary object of some kind. In particular, the rules about comparing a String, Number, or Boolean to a Node-set are nasty. If you're passing XObjects to variables, they may be especially important, as the XPath implementation may need to use them to do comparison operations. Again I'll bow to your reasoning.