throw new AssertionError("*** No select expression for global variable $" +
getVariableQName().getDisplayName() + "!!");
} else {
XPathContextMajor c2 = context.newCleanContext();
c2.setOrigin(this);
UnfailingIterator initialNode =
SingletonIterator.makeIterator(c2.getController().getContextForGlobalVariables());
initialNode.next();
c2.setCurrentIterator(initialNode);
if (stackFrameMap != null) {
c2.openStackFrame(stackFrameMap);
}
return ExpressionTool.evaluate(select, evaluationMode, c2, referenceCount);