net.sf.saxon.instruct
Interface TailCall
public interface TailCall
Interface representing a Tail Call. This is a package of information passed back by a called
instruction to its caller, representing a call (and its arguments) that needs to be made
by the caller. This saves stack space by unwinding the stack before making the call.
processLeavingTail
TailCall processLeavingTail(XPathContext context)
throws TransformerException
- Process this TailCall (that is, executed the template call that is packaged in this
object). This may return a further TailCall, which should also be processed: this
is the mechanism by which a nested set of recursive calls is converted into an iteration.
- Parameters:
context
- The dynamic context of the transformation
- Returns:
- a further TailCall, if the recursion continues, or null, indicating that the
recursion has terminated.
- Throws:
TransformerException
- if any error occurs processing the tail call