|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.pattern.Pattern
net.sf.saxon.pattern.NodeSetPattern
net.sf.saxon.pattern.IDPattern
public final class IDPattern
An IDPattern is a pattern of the form id("literal") or id($variable)
| Field Summary |
|---|
| Fields inherited from class net.sf.saxon.pattern.NodeSetPattern |
|---|
expression, itemType |
| Constructor Summary | |
|---|---|
IDPattern(Expression id,
Configuration config)
Create an id pattern. |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class net.sf.saxon.pattern.NodeSetPattern |
|---|
allocateSlots, equals, getDependencies, hashCode, iterateSubExpressions, promote, replaceSubExpression |
| Methods inherited from class net.sf.saxon.pattern.Pattern |
|---|
getColumnNumber, getContainerGranularity, getDefaultPriority, getExecutable, getFingerprint, getHostLanguage, getLineNumber, getLocationProvider, getPublicId, getSystemId, internalMatches, make, makeSearchExpression, matchesBeneathAnchor, resolveCurrent, selectNodes, setExecutable, setLineNumber, setOriginalText, setSystemId, simplify, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IDPattern(Expression id,
Configuration config)
id - Either a StringValue or a VariableReference| Method Detail |
|---|
public 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.
XPathException
public 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||