org.jaxen.pattern
Class LocationPathPattern
public class LocationPathPattern
LocationPathPattern
matches any node using a
location path such as A/B/C.
The parentPattern and ancestorPattern properties are used to
chain location path patterns together
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 |
absolute
private boolean absolute
Whether this lcoation path is absolute or not
ancestorPattern
private Pattern ancestorPattern
Patterns matching one of my ancestors
filters
private List filters
The filters to match against
nodeTest
private NodeTest nodeTest
The node test to perform on this step of the path
parentPattern
private Pattern parentPattern
Patterns matching my parent node
LocationPathPattern
public LocationPathPattern()
LocationPathPattern
public LocationPathPattern(NodeTest nodeTest)
addFilter
public void addFilter(FilterExpr filter)
Adds a filter to this pattern
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
hasAnyNodeTest
public boolean hasAnyNodeTest()
isAbsolute
public boolean isAbsolute()
setAbsolute
public void setAbsolute(boolean absolute)
setAncestorPattern
public void setAncestorPattern(Pattern ancestorPattern)
Adds a pattern for an ancestor of the current
context node used in this pattern.
setParentPattern
public void setParentPattern(Pattern parentPattern)
Adds a pattern for the parent of the current
context node used in this pattern.
toString
public String toString()