int i = vars.size();
while (--i >= 0)
{
ElemVariable v = (ElemVariable) vars.elementAt(i);
Arg previouslyDeclared = vs.getDeclaredVariable(v.getName());
if (null != previouslyDeclared)
{
if ( (v instanceof ElemParam) && previouslyDeclared.isFromWithParam() )
{
previouslyDeclared.setIsVisible(true);
}
else
{
xobj = new XUnresolvedVariable(v, contextNode,
this, vs.getSearchStartOrTop(), 0, true);
previouslyDeclared.setVal(xobj);
}
continue;
}
// XObject xobj = v.getValue(this, contextNode);
xobj = new XUnresolvedVariable(v, contextNode,
this, vs.getSearchStartOrTop(), 0, true);
vs.pushVariable(v.getName(), xobj);
vs.markGlobalStackFrame();
}
vs.markGlobalStackFrame();
int endGlobals = vs.size();
for(i = startGlobals; i < endGlobals; i++)
{
Arg arg = (Arg)vs.elementAt(i);
XUnresolvedVariable uv = (XUnresolvedVariable)arg.getVal();
uv.setVarStackPos(endGlobals);
}
vs.pushContextMarker();
}