|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.pattern.Pattern | +--com.icl.saxon.pattern.NodeTest
A NodeTest is a simple kind of pattern that enables a context-free test of whether a node has a particular name. There are five kinds of name test: a full name test, a prefix test, and an "any node of a given type" test, an "any node of any type" test, and a "no nodes" test (used, e.g. for "@comment()")
Fields inherited from class com.icl.saxon.pattern.Pattern |
originalText, staticContext |
Constructor Summary | |
NodeTest()
|
Method Summary | |
abstract boolean |
matches(NodeInfo node)
Test whether this node test is satisfied by a given node |
boolean |
matches(NodeInfo node,
Context c)
Test whether this node test is satisfied by a given node, in a given Context |
abstract boolean |
matches(short nodeType,
int fingerprint)
Test whether this node test is satisfied by a given node |
Methods inherited from class com.icl.saxon.pattern.Pattern |
getDefaultPriority, getFingerprint, getLineNumber, getNodeType, getStaticContext, getSystemId, make, setOriginalText, setStaticContext, simplify, toString |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public NodeTest()
Method Detail |
public abstract boolean matches(NodeInfo node)
public abstract boolean matches(short nodeType, int fingerprint)
nodeType
- The type of node to be matchedfingerprint
- identifies the expanded name of the node to be matched.
The value should be -1 for a node with no name.public final boolean matches(NodeInfo node, Context c)
matches
in class Pattern
com.icl.saxon.pattern.Pattern
node
- The NodeInfo representing the Element or other node to be tested against the Patterncontext
- The context in which the match is to take place. Only relevant if the pattern
uses variables.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |