| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.instruct.Instruction net.sf.saxon.instruct.ApplyTemplates
ApplyTemplates | public class ApplyTemplates extends Instruction (Code) | | An instruction representing an xsl:apply-templates element in the stylesheet
|
Constructor Summary | |
public | ApplyTemplates(Expression select, boolean useCurrentMode, boolean useTailRecursion, Mode mode, boolean backwardsCompatible) |
Method Summary | |
public 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.
exception: XPathException - if any dynamic error occurs Parameters: iterator - an Iterator over the nodes to be processed, in thecorrect (sorted) order Parameters: mode - Identifies the processing mode. | final public boolean | createsNewNodes() Determine whether this instruction creates new nodes. | public 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. | public void | display(int level, NamePool pool, PrintStream out) Diagnostic print of expression structure. | public InstructionInfo | getInstructionInfo() Set additional trace properties appropriate to the kind of instruction. | public int | getInstructionNameCode() | public Iterator | iterateSubExpressions() | public Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) | public void | process(XPathContext context) | public TailCall | processLeavingTail(XPathContext context) | protected void | promoteInst(PromotionOffer offer) Handle promotion offers, that is, non-local tree rewrites. | public void | setActualParameters(WithParam[] actualParams, WithParam[] tunnelParams) | public Expression | simplify(StaticContext env) Simplify an expression. | public Expression | typeCheck(StaticContext env, ItemType contextItemType) |
ApplyTemplates | public ApplyTemplates(Expression select, boolean useCurrentMode, boolean useTailRecursion, Mode mode, boolean backwardsCompatible)(Code) | | |
applyTemplates | public static TailCall applyTemplates(SequenceIterator iterator, Mode mode, ParameterSet parameters, ParameterSet tunnelParameters, XPathContextMajor context, boolean backwardsCompatible, int locationId) throws XPathException(Code) | | Process selected nodes using the handlers registered for a particular
mode.
exception: XPathException - if any dynamic error occurs Parameters: iterator - an Iterator over the nodes to be processed, in thecorrect (sorted) order Parameters: mode - Identifies the processing mode. It should match themode defined when the element handler was registered usingsetHandler with a mode parameter. Set this parameter to null toinvoke the default mode. Parameters: parameters - A ParameterSet containing the parameters tothe handler/template being invoked. Specify null if there are noparameters. Parameters: tunnelParameters - A ParameterSet containing the parameters tothe handler/template being invoked. Specify null if there are noparameters. Parameters: context - A newly-created context object Parameters: locationId - a TailCall returned by the last template to be invoked, or null,indicating that there are no outstanding tail calls. |
createsNewNodes | final public boolean createsNewNodes()(Code) | | Determine whether this instruction creates new nodes.
This implementation returns true (which is almost invariably the case, so it's not worth
doing any further analysis to find out more precisely).
|
defaultAction | public static void defaultAction(NodeInfo node, ParameterSet parameters, ParameterSet tunnelParams, XPathContext context, boolean backwardsCompatible, int locationId) throws XPathException(Code) | | Perform the built-in template action for a given node.
Parameters: node - the node to be processed Parameters: parameters - the parameters supplied to apply-templates Parameters: tunnelParams - the tunnel parameters to be passed through Parameters: backwardsCompatible - true if in 1.0 mode (currently makes no difference) Parameters: locationId - location of the instruction (apply-templates, apply-imports etc) that causedthe built-in template to be invoked exception: XPathException - if any dynamic error occurs |
display | public void display(int level, NamePool pool, PrintStream out)(Code) | | Diagnostic print of expression structure. The expression is written to the System.err
output stream
Parameters: level - indentation level for this expression Parameters: out - |
getInstructionInfo | public InstructionInfo getInstructionInfo()(Code) | | Set additional trace properties appropriate to the kind of instruction. This
implementation adds the mode attribute
|
getInstructionNameCode | public int getInstructionNameCode()(Code) | | Get the name of this instruction for diagnostic and tracing purposes
|
iterateSubExpressions | public Iterator iterateSubExpressions()(Code) | | 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)
|
setActualParameters | public void setActualParameters(WithParam[] actualParams, WithParam[] tunnelParams)(Code) | | Set the actual parameters on the call
|
simplify | public Expression simplify(StaticContext env) throws XPathException(Code) | | Simplify an expression. This performs any static optimization (by rewriting the expression
as a different expression).
exception: XPathException - if an error is discovered during expressionrewriting the simplified expression |
|
|