net.sf.saxon.instruct
public class ApplyTemplates extends Instruction
Constructor Summary | |
---|---|
ApplyTemplates(Expression select, boolean useCurrentMode, boolean useTailRecursion, Mode mode, boolean backwardsCompatible) |
Method Summary | |
---|---|
static TailCall | applyTemplates(SequenceIterator iterator, Mode mode, ParameterSet parameters, ParameterSet tunnelParameters, XPathContextMajor context, boolean backwardsCompatible, int locationId)
Process selected nodes using the handlers registered for a particular
mode.
|
boolean | createsNewNodes()
Determine whether this instruction creates new nodes.
|
static void | defaultAction(NodeInfo node, ParameterSet parameters, ParameterSet tunnelParams, XPathContext context, boolean backwardsCompatible, int locationId)
Perform the built-in template action for a given node.
|
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure. |
InstructionInfo | getInstructionInfo()
Set additional trace properties appropriate to the kind of instruction. |
int | getInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes |
Iterator | iterateSubExpressions()
Get all the XPath expressions associated with this instruction
(in XSLT terms, the expression present on attributes of the instruction,
as distinct from the child instructions in a sequence construction) |
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) |
void | process(XPathContext context) |
TailCall | processLeavingTail(XPathContext context) |
protected void | promoteInst(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites. |
void | setActualParameters(WithParam[] actualParams, WithParam[] tunnelParams)
Set the actual parameters on the call |
Expression | simplify(StaticContext env)
Simplify an expression. |
Expression | typeCheck(StaticContext env, ItemType contextItemType) |
Parameters: iterator an Iterator over the nodes to be processed, in the correct (sorted) order mode Identifies the processing mode. It should match the mode defined when the element handler was registered using setHandler with a mode parameter. Set this parameter to null to invoke the default mode. parameters A ParameterSet containing the parameters to the handler/template being invoked. Specify null if there are no parameters. tunnelParameters A ParameterSet containing the parameters to the handler/template being invoked. Specify null if there are no parameters. context A newly-created context object locationId
Returns: a TailCall returned by the last template to be invoked, or null, indicating that there are no outstanding tail calls.
Throws: XPathException if any dynamic error occurs
Parameters: node the node to be processed parameters the parameters supplied to apply-templates tunnelParams the tunnel parameters to be passed through backwardsCompatible true if in 1.0 mode (currently makes no difference) locationId location of the instruction (apply-templates, apply-imports etc) that caused the built-in template to be invoked
Throws: XPathException if any dynamic error occurs
Parameters: level indentation level for this expression out
Parameters: offer The type of rewrite being offered
Throws: XPathException
Returns: the simplified expression
Throws: XPathException if an error is discovered during expression rewriting