com.jclark.xsl.expr

Class ElementTest

Implemented Interfaces:
PathPattern, Pattern, TopLevelPattern

(package private) class ElementTest
extends PathPatternBase

A compiled XPath expression (component) tests a node for being an ELEMENT with a given Name

Constructor Summary

ElementTest(Name name)
construct with the Name to be tested

Method Summary

int
getDefaultPriority()
(package private) Name
getMatchName()
(package private) byte
getMatchNodeType()
boolean
matches(Node node, ExprContext context)

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

getAlternatives, getMatchName, getMatchNodeType

Constructor Details

ElementTest

(package private)  ElementTest(Name name)
construct with the Name to be tested

Method Details

getDefaultPriority

public int getDefaultPriority()
Specified by:
getDefaultPriority in interface PathPattern
Returns:
0

getMatchName

(package private)  Name getMatchName()
Overrides:
getMatchName in interface PathPatternBase
Returns:
the Name to test

getMatchNodeType

(package private)  byte getMatchNodeType()
Overrides:
getMatchNodeType in interface PathPatternBase
Returns:
om.Node.ELEMENT

matches

public boolean matches(Node node,
                       ExprContext context)
Specified by:
matches in interface Pattern
Returns:
true if the node is an Element and has the Name we're testing