// We need to push an element frame in the variables stack,
// so all the variables can be popped at once when we're done.
VariableStack varstack = getXPathContext().getVarStack();
varstack.pushElemFrame();
SourceLocator savedLocator = xctxt.getSAXLocator();
try
{