com.jclark.xsl.expr
Class AttributeTest

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

 class AttributeTest
extends PathPatternBase

A compiled XPath component that tests a node to see if it is an attribute with a (possibly?) specified name


Constructor Summary
AttributeTest(Name name)
          construct with the given name
 
Method Summary
 int getDefaultPriority()
          priority when used in XSLT template match pattern
(package private)  Name getMatchName()
          by default, returns null Element, Attribute and PI nodetype tests will override this
(package private)  byte getMatchNodeType()
           
 boolean matches(Node node, ExprContext context)
          return true if the given node matches this pattern when evaluated in the given ExpressionContext
 
Methods inherited from class com.jclark.xsl.expr.PathPatternBase
getAlternatives
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeTest

AttributeTest(Name name)
construct with the given name

Method Detail

matches

public boolean matches(Node node,
                       ExprContext context)
Description copied from interface: Pattern
return true if the given node matches this pattern when evaluated in the given ExpressionContext

Returns:
true if the node is an ATTRIBUTE and has the specified Name

getMatchName

Name getMatchName()
Description copied from class: PathPatternBase
by default, returns null Element, Attribute and PI nodetype tests will override this

Overrides:
getMatchName in class PathPatternBase
Returns:
the Name we test for

getMatchNodeType

byte getMatchNodeType()
Specified by:
getMatchNodeType in class PathPatternBase
Returns:
om.Node.ATTRIBUTE

getDefaultPriority

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

Returns:
0