public final class IDPattern extends NodeSetPattern
expression, itemType| Constructor and Description |
|---|
IDPattern(Expression id,
Configuration config)
Create an id pattern.
|
| Modifier and Type | Method and Description |
|---|---|
Pattern |
analyze(ExpressionVisitor visitor,
ItemType contextItemType)
Type-check the pattern.
|
int |
getNodeKind()
Determine the type of nodes to which this pattern applies.
|
NodeTest |
getNodeTest()
Get a NodeTest that all the nodes matching this pattern must satisfy
|
boolean |
matches(NodeInfo e,
XPathContext context)
Determine whether this Pattern matches the given Node
|
allocateSlots, equals, getDependencies, hashCode, iterateSubExpressions, promote, replaceSubExpressiongetColumnNumber, getContainerGranularity, getDefaultPriority, getExecutable, getFingerprint, getHostLanguage, getLineNumber, getLocationProvider, getPublicId, getSystemId, internalMatches, make, makeSearchExpression, matchesBeneathAnchor, resolveCurrent, selectNodes, setExecutable, setLineNumber, setOriginalText, setSystemId, simplify, toStringpublic IDPattern(Expression id, Configuration config)
id - Either a StringValue or a VariableReferencepublic Pattern analyze(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException
analyze in class NodeSetPatternvisitor - the expression visitorcontextItemType - the type of the context item at the point where the pattern
is defined. Set to null if it is known that the context item is undefined.XPathExceptionpublic boolean matches(NodeInfo e, XPathContext context) throws XPathException
matches in class NodeSetPatterne - The NodeInfo representing the Element or other node to be tested against the Patterncontext - The dynamic context. Only relevant if the pattern
uses variables, or contains calls on functions such as document() or key().XPathExceptionpublic int getNodeKind()
getNodeKind in class NodeSetPatternpublic NodeTest getNodeTest()
getNodeTest in class NodeSetPattern