org.jaxen.pattern
Class NameTest
NameTest tests for a node name.
private String | name- The name to match against
|
private short | nodeType- The type of node to match - either attribute or element
|
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 |
name
private String name
The name to match against
nodeType
private short nodeType
The type of node to match - either attribute or element
NameTest
public NameTest(String name,
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()