net.sf.saxon.trans
public class Mode extends Object implements Serializable
Nested Class Summary | |
---|---|
static class | Mode.Rule
Inner class Rule used to support the implementation |
Field Summary | |
---|---|
static int | ALL_MODES |
static int | DEFAULT_MODE |
static int | NAMED_MODE |
static int | STRIPPER_MODE |
Constructor Summary | |
---|---|
Mode(int usage)
Default constructor - creates a Mode containing no rules | |
Mode(Mode omniMode)
Construct a new Mode, copying the contents of an existing Mode
|
Method Summary | |
---|---|
void | addRule(Pattern p, Object obj, int precedence, double priority)
Add a rule to the Mode. |
int | getList(int fingerprint, int type)
Determine which list to use for a given pattern (we must also search the generic list) |
Object | getNextMatchRule(NodeInfo node, Object currentHandler, XPathContext context)
Get the rule corresponding to a given Node, by finding the next-best Pattern match
after the specified object.
|
Object | getRule(NodeInfo node, XPathContext context)
Get the rule corresponding to a given Node, by finding the best Pattern match.
|
Object | getRule(NodeInfo node, int min, int max, XPathContext context)
Get the rule corresponding to a given Node, by finding the best Pattern match, subject to a minimum
and maximum precedence. |
boolean | isDefaultMode()
Determine if this is the default mode |
Parameters: usage one of DEFAULT_MODE, NAMED_MODE, STRIPPER_MODE
Parameters: omniMode the existing mode. May be null, in which case it is not copied
Parameters: p a Pattern obj the Object to return from getRule() when the supplied node matches this Pattern precedence the import precedence of the rule priority the explicit or implicit priority of the rule
Parameters: node the NodeInfo referring to the node to be matched
Returns: the object (e.g. a NodeHandler) registered for that element, if any (otherwise null).
Parameters: node the NodeInfo referring to the node to be matched
Returns: the object (e.g. a NodeHandler) registered for that element, if any (otherwise null).
Parameters: node the NodeInfo referring to the node to be matched
Returns: the object (e.g. a NodeHandler) registered for that element, if any (otherwise null).