|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.sf.saxon.trans.RuleManager
RuleManager maintains a set of template rules, one set for each mode
| Constructor Summary | |
RuleManager()
create a RuleManager and initialise variables. |
|
| Method Summary | |
Mode |
getMode(int modeNameCode)
Get the Mode object for a named mode. |
Template |
getNextMatchHandler(NodeInfo node,
Mode mode,
Template currentHandler,
XPathContext c)
Get the next-match handler after the current one |
Template |
getTemplateRule(NodeInfo node,
Mode mode,
int min,
int max,
XPathContext c)
Get a template rule whose import precedence is in a particular range. |
Template |
getTemplateRule(NodeInfo node,
Mode mode,
XPathContext c)
Find the template rule registered for a particular node in a specific mode. |
void |
resetHandlers()
Set up a new table of handlers. |
void |
setHandler(Pattern pattern,
Template eh,
Mode mode,
int precedence)
Register a handler for a particular pattern. |
void |
setHandler(Pattern pattern,
Template eh,
Mode mode,
int precedence,
double priority)
Register a handler for a particular pattern. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RuleManager()
| Method Detail |
public void resetHandlers()
public Mode getMode(int modeNameCode)
modeNameCode - The name code of the mode. Supply Mode.DEFAULT_MODE to get the default
mode or Mode.ALL_MODES to get the Mode object containing "mode=all" rules
public void setHandler(Pattern pattern,
Template eh,
Mode mode,
int precedence)
pattern - A match patterneh - The ElementHandler to be usedmode - The processing modeprecedence - The import precedence (use 0 by default)
public void setHandler(Pattern pattern,
Template eh,
Mode mode,
int precedence,
double priority)
pattern - Must be a valid Pattern.eh - The Template to be usedmode - The processing mode to which this element handler appliesprecedence - The import precedence of this rulepriority - The priority of the rule: if an element matches several patterns, the
one with highest priority is usedPattern
public Template getTemplateRule(NodeInfo node,
Mode mode,
XPathContext c)
throws XPathException
node - The NodeInfo for the relevant nodemode - The processing modec - The controller for this transformation
XPathException
public Template getTemplateRule(NodeInfo node,
Mode mode,
int min,
int max,
XPathContext c)
throws XPathException
node - The node to be matchedmode - The mode for which a rule is requiredmin - The minimum import precedence that the rule must havemax - The maximum import precedence that the rule must havec - The Controller for the transformation
XPathException
public Template getNextMatchHandler(NodeInfo node,
Mode mode,
Template currentHandler,
XPathContext c)
throws XPathException
node - The node to be matchedmode - The processing modecurrentHandler - The current template rulec - The dynamic context for the transformation
XPathException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||