| java.lang.Object net.sf.saxon.trans.RuleManager
RuleManager | public class RuleManager implements Serializable(Code) | | RuleManager maintains a set of template rules, one set for each mode
version: 10 December 1999: carved out of the old Controller class author: Michael H. Kay |
Constructor Summary | |
public | RuleManager() create a RuleManager and initialise variables. |
Method Summary | |
public Mode | getMode(int modeNameCode) Get the Mode object for a named mode. | public Template | getNextMatchHandler(NodeInfo node, Mode mode, Template currentHandler, XPathContext c) | public Template | getTemplateRule(NodeInfo node, Mode mode, XPathContext c) Find the template rule registered for a particular node in a specific mode. | public Template | getTemplateRule(NodeInfo node, Mode mode, int min, int max, XPathContext c) Get a template rule whose import precedence is in a particular range. | public void | resetHandlers() Set up a new table of handlers. | public void | setHandler(Pattern pattern, Template eh, Mode mode, int precedence) Register a handler for a particular pattern. | public void | setHandler(Pattern pattern, Template eh, Mode mode, int precedence, double priority) Register a handler for a particular pattern. |
RuleManager | public RuleManager()(Code) | | create a RuleManager and initialise variables.
|
getMode | public Mode getMode(int modeNameCode)(Code) | | Get the Mode object for a named mode. If there is not one already registered.
a new Mode is created.
Parameters: modeNameCode - The name code of the mode. Supply Mode.DEFAULT_MODE to get the defaultmode or Mode.ALL_MODES to get the Mode object containing "mode=all" rules the Mode with this name |
getNextMatchHandler | public Template getNextMatchHandler(NodeInfo node, Mode mode, Template currentHandler, XPathContext c) throws XPathException(Code) | | Get the next-match handler after the current one
Parameters: node - The node to be matched Parameters: mode - The processing mode Parameters: currentHandler - The current template rule Parameters: c - The dynamic context for the transformation The template rule to be executed throws: XPathException - |
getTemplateRule | public Template getTemplateRule(NodeInfo node, Mode mode, XPathContext c) throws XPathException(Code) | | Find the template rule registered for a particular node in a specific mode.
Parameters: node - The NodeInfo for the relevant node Parameters: mode - The processing mode Parameters: c - The controller for this transformation The template rule that will process this nodeReturns null if there is no specific handler registered. |
getTemplateRule | public Template getTemplateRule(NodeInfo node, Mode mode, int min, int max, XPathContext c) throws XPathException(Code) | | Get a template rule whose import precedence is in a particular range. This is used to support
the xsl:apply-imports function
Parameters: node - The node to be matched Parameters: mode - The mode for which a rule is required Parameters: min - The minimum import precedence that the rule must have Parameters: max - The maximum import precedence that the rule must have Parameters: c - The Controller for the transformation The template rule to be invoked throws: XPathException - |
resetHandlers | public void resetHandlers()(Code) | | Set up a new table of handlers.
|
setHandler | public void setHandler(Pattern pattern, Template eh, Mode mode, int precedence)(Code) | | Register a handler for a particular pattern. The priority of the rule
is the default priority for the pattern, which depends on the syntax of
the pattern suppllied.
Parameters: pattern - A match pattern Parameters: eh - The ElementHandler to be used Parameters: mode - The processing mode Parameters: precedence - The import precedence (use 0 by default) |
setHandler | public void setHandler(Pattern pattern, Template eh, Mode mode, int precedence, double priority)(Code) | | Register a handler for a particular pattern.
Parameters: pattern - Must be a valid Pattern. Parameters: eh - The Template to be used Parameters: mode - The processing mode to which this element handler applies Parameters: precedence - The import precedence of this rule Parameters: priority - The priority of the rule: if an element matches several patterns, theone with highest priority is used See Also: Pattern |
|
|