Hashtable<QName,RuntimeValue> globals = inScopeOptions;
XdmNode doc = null;
try {
if (var.getBinding().size() > 0) {
Binding binding = var.getBinding().firstElement();
ReadablePipe pipe = null;
if (binding.getBindingType() == Binding.ERROR_BINDING) {
pipe = ((XCatch) this).errorPipe;
} else {
pipe = getPipeFromBinding(binding);
}
doc = pipe.read();