org.jaxen.pattern
Class NodeTypeTest
public class NodeTypeTest
NodeTypeTest matches if the node is of a certain type
such as element, attribute, comment, text, processing instruction and so forth.
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, NO_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE |
ATTRIBUTE_TEST
public static final NodeTypeTest ATTRIBUTE_TEST
NAMESPACE_TEST
public static final NodeTypeTest NAMESPACE_TEST
PROCESSING_INSTRUCTION_TEST
public static final NodeTypeTest PROCESSING_INSTRUCTION_TEST
nodeType
private short nodeType
NodeTypeTest
public NodeTypeTest(short nodeType)
getMatchType
public short getMatchType()
Returns the type of node the pattern matches.
- getMatchType in interface Pattern
ANY_NODE unless overridden
getPriority
public double getPriority()
- getPriority in interface Pattern
- 0.5; the default priority defined in XSLT
getText
public String getText()
Returns a textual representation of this pattern
- getText in interface Pattern
- the usual string form of this XSLT pattern
matches
public boolean matches(Object node,
Context context)- matches in interface Pattern
- true if the pattern matches the given node
toString
public String toString()