public class NodePattern extends AbstractPattern
_child, _parent, log, XMLNS
Constructor and Description |
---|
NodePattern(AbstractPattern parent,
java.lang.String tag,
int nodeType)
Creates a new node-matching pattern.
|
Modifier and Type | Method and Description |
---|---|
AbstractPattern |
copyPosition()
Copies the position (non-axis) portion of the pattern.
|
boolean |
equals(java.lang.Object b)
Returns true if the two patterns are equal.
|
java.lang.String |
getNodeName()
Returns the pattern's matching node name.
|
double |
getPriority()
All priorities are based on the node priority.
|
boolean |
match(org.w3c.dom.Node node,
ExprEnvironment env)
matches if the node type matches and the node name matches.
|
java.lang.String |
toString()
Converts the pattern back to its
|
copyAxis, count, createNodeIterator, findAny, firstNode, getParent, getPrefix, isAscending, isStrictlyAscending, isUnique, lastNode, nextNode, position, select, selectUnique, toPatternString
public NodePattern(AbstractPattern parent, java.lang.String tag, int nodeType)
public double getPriority()
getPriority
in class AbstractPattern
public java.lang.String getNodeName()
getNodeName
in class AbstractPattern
public boolean match(org.w3c.dom.Node node, ExprEnvironment env) throws XPathException
match
in class AbstractPattern
node
- the node to test.env
- the variable environmentXPathException
public AbstractPattern copyPosition()
copyPosition
in class AbstractPattern
public boolean equals(java.lang.Object b)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object