org.jaxen.pattern
Class NamespaceTest
public class NamespaceTest
NamespaceTest
tests for a given namespace URI.
private short | nodeType - The type of node to match - either attribute or element
|
private String | prefix - The prefix to match against
|
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 |
nodeType
private short nodeType
The type of node to match - either attribute or element
prefix
private String prefix
The prefix to match against
NamespaceTest
public NamespaceTest(String prefix,
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
getURI
protected String getURI(Object node,
Context context)
Returns the URI of the current prefix or "" if no URI can be found
matches
public boolean matches(Object node,
Context context)
- matches in interface Pattern
- true if the pattern matches the given node
toString
public String toString()