com.jclark.xsl.expr

Class NodeTypeTest

Implemented Interfaces:
PathPattern, Pattern, TopLevelPattern

(package private) 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, getMatchNodeType

Constructor Details

NodeTypeTest

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

Method Details

getDefaultPriority

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

getMatchNodeType

(package private)  byte getMatchNodeType()
Overrides:
getMatchNodeType in interface PathPatternBase
Returns:
one of the constants on om.Node ... the type of node we match

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
Specified by:
matches in interface Pattern