org.dom4j.rule
public class Mode extends Object
Mode
manages a number of RuleSet instances for the mode in a
stylesheet. It is responsible for finding the correct rule for a given DOM4J
Node using the XSLT processing model uses the smallest possible RuleSet to
reduce the number of Rule evaluations.
Version: $Revision: 1.9 $
Constructor Summary | |
---|---|
Mode() |
Method Summary | |
---|---|
void | addRule(Rule rule) |
protected Map | addToNameMap(Map map, String name, Rule rule)
Adds the Rule to a RuleSet for the given name.
|
void | applyTemplates(Element element) |
void | applyTemplates(Document document) |
void | fireRule(Node node)
Runs the actions associated with the given node
|
Rule | getMatchingRule(Node node)
Performs an XSLT processing model match for the rule which matches the
given Node the best.
|
protected RuleSet | getRuleSet(int matchType)
DOCUMENT ME!
|
protected void | removeFromNameMap(Map map, String name, Rule rule) |
void | removeRule(Rule rule) |
Parameters: map DOCUMENT ME! name DOCUMENT ME! rule DOCUMENT ME!
Returns: the Map (which will be created if the given map was null
Parameters: node DOCUMENT ME!
Throws: Exception DOCUMENT ME!
Parameters: node is the DOM4J Node to match against
Returns: the matching Rule or no rule if none matched
Parameters: matchType DOCUMENT ME!
Returns: the RuleSet for the given matching type. This method will never return null, a new instance will be created.