|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.pattern.Pattern net.sf.saxon.pattern.AnchorPattern
public class AnchorPattern
This is a special pattern that matches the "anchor node"; it is not used for XSLT patterns, but for the selectors that arise when evaluating XPath expressions in streaming mode; the anchor node is the context node for the streamed XPath evaluation.
Constructor Summary | |
---|---|
AnchorPattern()
|
Method Summary | |
---|---|
Pattern |
analyze(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
Type-check the pattern. |
ItemType |
getItemType()
Get a NodeTest that all the nodes matching this pattern must satisfy |
protected boolean |
internalMatches(NodeInfo node,
NodeInfo anchor,
XPathContext context)
Determine whether this Pattern matches the given Node. |
boolean |
matches(Item item,
XPathContext context)
Determine whether this Pattern matches the given Node. |
boolean |
matchesBeneathAnchor(NodeInfo node,
NodeInfo anchor,
XPathContext context)
Determine whether this pattern matches a given Node within the subtree rooted at a given anchor node. |
String |
toString()
Get the original pattern text |
Methods inherited from class net.sf.saxon.pattern.Pattern |
---|
allocateSlots, getColumnNumber, getContainerGranularity, getDefaultPriority, getDependencies, getExecutable, getFingerprint, getHostLanguage, getLineNumber, getLocationProvider, getNodeKind, getPublicId, getSystemId, iterateSubExpressions, make, promote, replaceSubExpression, resolveCurrent, selectNodes, setExecutable, setLineNumber, setOriginalText, setSystemId, simplify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AnchorPattern()
Method Detail |
---|
public Pattern analyze(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException
analyze
in class Pattern
visitor
- 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 matchesBeneathAnchor(NodeInfo node, NodeInfo anchor, XPathContext context) throws XPathException
matchesBeneathAnchor
in class Pattern
node
- The NodeInfo representing the Element or other node to be tested against the Patternanchor
- The anchor node, which must match any AnchorPattern subpatterncontext
- The dynamic context. Only relevant if the pattern
uses variables, or contains calls on functions such as document() or key().
XPathException
public boolean matches(Item item, XPathContext context) throws XPathException
matches
in class Pattern
item
- 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().
XPathException
protected boolean internalMatches(NodeInfo node, NodeInfo anchor, XPathContext context) throws XPathException
internalMatches
in class Pattern
node
- The NodeInfo representing the Element or other node to be tested against the Patternanchor
- context
- The dynamic context. Only relevant if the pattern
uses variables, or contains calls on functions such as document() or key().
XPathException
public ItemType getItemType()
getItemType
in class Pattern
public String toString()
Pattern
toString
in class Pattern
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |