com.jclark.xsl.expr
Class ParentPattern

java.lang.Object
  extended bycom.jclark.xsl.expr.PathPatternBase
      extended bycom.jclark.xsl.expr.ParentPattern
All Implemented Interfaces:
PathPattern, Pattern, TopLevelPattern

class ParentPattern
extends PathPatternBase

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


Constructor Summary
(package private) ParentPattern(PathPatternBase childPattern, Pattern parentPattern)
          construct with a new stepPattern: childPattern and a previous parentPattern
 
Method Summary
 PathPattern[] getAlternatives()
          by default, only return a list of length one (itself)
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParentPattern

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

Method Detail

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!

Throws:
XSLException

getDefaultPriority

public int getDefaultPriority()
Description copied from interface: PathPattern
priority when used in XSLT template match pattern


getMatchName

Name getMatchName()
gets the rightmost (final) step's matchNodeType

Overrides:
getMatchName in class PathPatternBase

getMatchNodeType

byte getMatchNodeType()
gets the rightmost (final) step's matchNodeType

Specified by:
getMatchNodeType in class PathPatternBase

getAlternatives

public PathPattern[] getAlternatives()
by default, only return a list of length one (itself)

Specified by:
getAlternatives in interface TopLevelPattern