com.jclark.xsl.expr

Class ParentPattern

Implemented Interfaces:
PathPattern, Pattern, TopLevelPattern

(package private) class ParentPattern
extends PathPatternBase

represents the concatenation of step patterns, right to left in a LocationPathPattern

Constructor Summary

ParentPattern(PathPatternBase childPattern, Pattern parentPattern)
construct with a new stepPattern: childPattern and a previous parentPattern

Method Summary

int
getDefaultPriority()
priority when used in XSLT template match pattern
(package private) Name
getMatchName()
gets the rightmost (final) step's matchNodeType
(package private) byte
getMatchNodeType()
gets the rightmost (final) step's matchNodeType
boolean
matches(Node node, ExprContext context)
if the rightmost step matches, and our parentPattern's matches() returns true for this node's parent then we have a winner!

Methods inherited from class com.jclark.xsl.expr.PathPatternBase

getAlternatives, getMatchName, getMatchNodeType

Constructor Details

ParentPattern

(package private)  ParentPattern(PathPatternBase childPattern,
                                 Pattern parentPattern)
construct with a new stepPattern: childPattern and a previous parentPattern

Method Details

getDefaultPriority

public int getDefaultPriority()
priority when used in XSLT template match pattern
Specified by:
getDefaultPriority in interface PathPattern

getMatchName

(package private)  Name getMatchName()
gets the rightmost (final) step's matchNodeType
Overrides:
getMatchName in interface PathPatternBase

getMatchNodeType

(package private)  byte getMatchNodeType()
gets the rightmost (final) step's matchNodeType
Overrides:
getMatchNodeType in interface PathPatternBase

matches

public boolean matches(Node node,
                       ExprContext context)
            throws XSLException
if the rightmost step matches, and our parentPattern's matches() returns true for this node's parent then we have a winner!
Specified by:
matches in interface Pattern