public class FromContext extends AbstractPattern
_child, _parent, log, XMLNS| Constructor and Description |
|---|
FromContext() |
FromContext(int ancestorCount)
Creates a new context pattern.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractPattern |
copyAxis()
Returns the node itself for the axis.
|
AbstractPattern |
copyPosition()
Returns null since the axis isn't part of the position pattern.
|
int |
count(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern)
There is only a single node in the context axis.
|
NodeIterator |
createNodeIterator(org.w3c.dom.Node node,
ExprEnvironment env,
AbstractPattern match)
Creates a new node iterator.
|
boolean |
equals(java.lang.Object b)
Returns true if the two patterns are equal.
|
org.w3c.dom.Node |
firstNode(org.w3c.dom.Node node,
ExprEnvironment env)
Returns the first node in the selection order.
|
int |
getCount() |
boolean |
isStrictlyAscending()
The context is strictly ascending.
|
boolean |
isUnique()
Returns true if the pattern's selector returns unique nodes.
|
boolean |
match(org.w3c.dom.Node node,
ExprEnvironment env)
Matches the node context
|
org.w3c.dom.Node |
nextNode(org.w3c.dom.Node node,
org.w3c.dom.Node lastNode)
Returns the next node in the selection order.
|
int |
position(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern)
There is only a single node in the context axis.
|
java.lang.String |
toString()
Prints the pattern representing the context.
|
findAny, getNodeName, getParent, getPrefix, getPriority, isAscending, lastNode, select, selectUnique, toPatternStringpublic FromContext()
public FromContext(int ancestorCount)
ancestorCount - number of parents where the real context startspublic int getCount()
public boolean match(org.w3c.dom.Node node,
ExprEnvironment env)
match in class AbstractPatternnode - the current nodeenv - the variable environmentpublic boolean isStrictlyAscending()
public int position(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern)
node - the current nodeenv - the variable environmentpattern - the position patternpublic int count(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern)
node - the current nodeenv - the variable environmentpattern - the position patternpublic org.w3c.dom.Node firstNode(org.w3c.dom.Node node,
ExprEnvironment env)
firstNode in class AbstractPatternnode - the current nodeenv - the current environmentpublic org.w3c.dom.Node nextNode(org.w3c.dom.Node node,
org.w3c.dom.Node lastNode)
nextNode in class AbstractPatternnode - the current nodelastNode - the last nodepublic boolean equals(java.lang.Object b)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic NodeIterator createNodeIterator(org.w3c.dom.Node node, ExprEnvironment env, AbstractPattern match) throws XPathException
createNodeIterator in class AbstractPatternnode - the starting nodeenv - the variable environmentmatch - the axis match patternXPathExceptionpublic AbstractPattern copyAxis()
copyAxis in class AbstractPatternpublic AbstractPattern copyPosition()
copyPosition in class AbstractPatternpublic boolean isUnique()
isUnique in class AbstractPattern