| java.lang.Object net.sf.saxon.pattern.Pattern net.sf.saxon.pattern.NodeTestPattern
NodeTestPattern | public class NodeTestPattern extends Pattern (Code) | | A NodeTestPattern is a pattern that consists simply of a NodeTest.
author: Michael H. Kay |
NodeTestPattern | public NodeTestPattern()(Code) | | |
getDefaultPriority | final public double getDefaultPriority()(Code) | | Determine the default priority of this node test when used on its own as a Pattern
|
getFingerprint | public int getFingerprint()(Code) | | Determine the name fingerprint of nodes to which this pattern applies. Used for
optimisation.
A fingerprint that the nodes must match, or -1 if it can match multiple fingerprints |
getNodeKind | public int getNodeKind()(Code) | | Determine the types of nodes to which this pattern applies. Used for optimisation.
For patterns that match nodes of several types, return Type.NODE
the type of node matched by this pattern. e.g. Type.ELEMENT or Type.TEXT |
getNodeTest | public NodeTest getNodeTest()(Code) | | Get a NodeTest that all the nodes matching this pattern must satisfy
|
matches | public boolean matches(NodeInfo node, XPathContext context)(Code) | | Determine whether this Pattern matches the given Node. This is the main external interface
for matching patterns: it sets current() to the node being tested
Parameters: node - The NodeInfo representing the Element or other node to be tested against the Pattern Parameters: context - The context in which the match is to take place. Only relevant if the patternuses variables, or contains calls on functions such as document() or key(). Not used (and can beset to null) in the case of patterns that are NodeTests true if the node matches the Pattern, false otherwise |
toString | public String toString()(Code) | | Display the pattern for diagnostics
|
|
|