com.jclark.xsl.expr
Class NodeTypeTest

java.lang.Object
  extended by com.jclark.xsl.expr.PathPatternBase
      extended by com.jclark.xsl.expr.NodeTypeTest
All Implemented Interfaces:
PathPattern, Pattern, TopLevelPattern

 class NodeTypeTest
extends PathPatternBase

Simply tests if a node is of a given type e.g. "text()"


Constructor Summary
NodeTypeTest(byte type)
          construct with one of the constants from om.Node
 
Method Summary
 int getDefaultPriority()
          priority when used in XSLT template match pattern
(package private)  byte getMatchNodeType()
           
 boolean matches(Node node, ExprContext context)
          return true if this represents the "node()" test, else return true if the node's type matches the test
 
Methods inherited from class com.jclark.xsl.expr.PathPatternBase
getAlternatives, getMatchName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeTypeTest

NodeTypeTest(byte type)
construct with one of the constants from om.Node

Method Detail

matches

public boolean matches(Node node,
                       ExprContext context)
return true if this represents the "node()" test, else return true if the node's type matches the test


getMatchNodeType

byte getMatchNodeType()
Specified by:
getMatchNodeType in class PathPatternBase
Returns:
one of the constants on om.Node ... the type of node we match

getDefaultPriority

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