internal object EvaluateVariable(VariableAction variable) {
Object result = this.processor.GetVariableValue(variable);
if (result == null && ! variable.IsGlobal) {
// This was uninitialized local variable. May be we have sutable global var too?
VariableAction global = this.manager.VariableScope.ResolveGlobalVariable(variable.Name);
if (global != null) {
result = this.processor.GetVariableValue(global);
}
}
if (result == null) {
throw XsltException.Create(Res.Xslt_InvalidVariable, variable.Name.ToString());
}
return result;
}