/** * Process the function call in push mode * @param context the XPath dynamic context * @throws XPathException */ public void process(XPathContext context) throws XPathException { ValueRepresentation[] actualArgs = evaluateArguments(context); if (tailCall) { ((XPathContextMajor)context).requestTailCall(function, actualArgs); } else { SequenceReceiver out = context.getReceiver(); XPathContextMajor c2 = context.newCleanContext(); c2.setReceiver(out); c2.setOrigin(this); function.process(actualArgs, c2); } }
/** * Process the function call in push mode * @param context the XPath dynamic context * @throws XPathException */ public void process(XPathContext context) throws XPathException { ValueRepresentation[] actualArgs = evaluateArguments(context); if (tailCall) { ((XPathContextMajor)context).requestTailCall(function, actualArgs); } else { SequenceReceiver out = context.getReceiver(); XPathContextMajor c2 = context.newCleanContext(); c2.setReceiver(out); c2.setOrigin(this); function.process(actualArgs, c2); } }
/** * Process the function call in push mode * @param context the XPath dynamic context * @throws XPathException */ public void process(XPathContext context) throws XPathException { ValueRepresentation[] actualArgs = evaluateArguments(context); if (tailCall) { ((XPathContextMajor)context).requestTailCall(function, actualArgs); } else { SequenceReceiver out = context.getReceiver(); XPathContextMajor c2 = context.newCleanContext(); c2.setReceiver(out); c2.setOrigin(this); function.process(actualArgs, c2); } }
/** * Create a context for evaluating this function * * @param oldContext the existing context of the caller * @return a new context which should be supplied to the call() method. */ public XPathContextMajor makeNewContext(XPathContext oldContext) { XPathContextMajor c2 = oldContext.newCleanContext(); c2.setOrigin(this); c2.setReceiver(oldContext.getReceiver()); c2.setTemporaryOutputState(StandardNames.XSL_FUNCTION); c2.setCurrentOutputUri(null); c2.setCurrentComponent(getDeclaringComponent()); // default value for the caller to override if necessary return c2; }
/** * Process the function call in pull mode * @param context the XPath dynamic context * @throws XPathException */ public EventIterator iterateEvents(XPathContext context) throws XPathException { ValueRepresentation[] actualArgs = evaluateArguments(context); if (tailCall) { ((XPathContextMajor)context).requestTailCall(function, actualArgs); return EmptyEventIterator.getInstance(); } else { SequenceReceiver out = context.getReceiver(); XPathContextMajor c2 = context.newCleanContext(); c2.setReceiver(out); c2.setOrigin(this); return function.iterateEvents(actualArgs, c2); } }
/** * Create a context for evaluating this function * * @param oldContext the existing context of the caller * @param originator * @return a new context which should be supplied to the call() method. */ public XPathContextMajor makeNewContext(XPathContext oldContext, ContextOriginator originator) { XPathContextMajor c2 = oldContext.newCleanContext(); c2.setReceiver(oldContext.getReceiver()); c2.setTemporaryOutputState(StandardNames.XSL_FUNCTION); c2.setCurrentOutputUri(null); c2.setCurrentComponent(getDeclaringComponent()); // default value for the caller to override if necessary c2.setOrigin(originator); return c2; }
/** * Process the function call in pull mode * @param context the XPath dynamic context * @throws XPathException */ public EventIterator iterateEvents(XPathContext context) throws XPathException { ValueRepresentation[] actualArgs = evaluateArguments(context); if (tailCall) { ((XPathContextMajor)context).requestTailCall(function, actualArgs); return EmptyEventIterator.getInstance(); } else { SequenceReceiver out = context.getReceiver(); XPathContextMajor c2 = context.newCleanContext(); c2.setReceiver(out); c2.setOrigin(this); return function.iterateEvents(actualArgs, c2); } }
/** * Process the function call in pull mode * @param context the XPath dynamic context * @throws XPathException */ public EventIterator iterateEvents(XPathContext context) throws XPathException { ValueRepresentation[] actualArgs = evaluateArguments(context); if (tailCall) { ((XPathContextMajor)context).requestTailCall(function, actualArgs); return EmptyEventIterator.getInstance(); } else { SequenceReceiver out = context.getReceiver(); XPathContextMajor c2 = context.newCleanContext(); c2.setReceiver(out); c2.setOrigin(this); return function.iterateEvents(actualArgs, c2); } }
savedXPathContext.setReceiver(new SequenceOutputter());
savedXPathContext.setReceiver(new SequenceOutputter());
savedXPathContext.setReceiver(null);
savedXPathContext.setReceiver(null);
savedXPathContext.setReceiver(null);
savedXPathContext.setReceiver(null);
initialContext.setReceiver(result);
initialContext.setReceiver(result);
receiver = new TreeReceiver(receiver); context.setReceiver(receiver); uf.process(vr, context); receiver.close();
receiver = new TreeReceiver(receiver); context.setReceiver(receiver); uf.process(vr, context); receiver.close();
initialContext.createThreadManager(); initialContext.setOrigin(this); initialContext.setReceiver(out);
initialContext.createThreadManager(); initialContext.setOrigin(this); initialContext.setReceiver(out);