/** * Construct a new context as a copy of another. The new context is effectively added to the top * of a stack, and contains a pointer to the previous context */ public XPathContextMajor newContext() { XPathContextMajor c = new XPathContextMajor(); c.controller = controller; c.currentIterator = currentIterator; c.stackFrame = stackFrame; c.localParameters = localParameters; c.last = last; c.currentReceiver = currentReceiver; c.isTemporaryDestination = isTemporaryDestination; c.xsltContext = xsltContext; c.caller = this; return c; }
public static XPathContextMajor newContext(XPathContextMinor p) { XPathContextMajor c = new XPathContextMajor(); c.controller = p.getController(); c.currentIterator = p.getCurrentIterator(); c.stackFrame = p.getStackFrame(); c.localParameters = p.getLocalParameters(); c.last = p.last; c.currentReceiver = p.currentReceiver; c.isTemporaryDestination = p.isTemporaryDestination; c.xsltContext = p.getXSLTContext(); c.caller = p; return c; }