com.icl.saxon.pattern
Class FirstElementPattern

java.lang.Object
  |
  +--com.icl.saxon.pattern.Pattern
        |
        +--com.icl.saxon.pattern.LocationPathPattern
              |
              +--com.icl.saxon.pattern.FirstElementPattern

public class FirstElementPattern
extends LocationPathPattern

FirstElementPattern is a specialisation of LocationPathPattern to handle the common case of a pattern with a single qualifier, the constant integer [1].


Fields inherited from class com.icl.saxon.pattern.LocationPathPattern
ancestorPattern, extent, filters, nameTest, nodeType, parentPattern
 
Fields inherited from class com.icl.saxon.pattern.Pattern
staticContext
 
Constructor Summary
FirstElementPattern()
           
 
Method Summary
protected  boolean testFilters(NodeInfo node, Context c)
          This testFilters() method simply tests whether the node is the first element matching the name test
 java.lang.String toString()
          Return the pattern as a string
 
Methods inherited from class com.icl.saxon.pattern.LocationPathPattern
addFilter, getName, getNameTest, getType, isRelative, matches, matchesX, simplify
 
Methods inherited from class com.icl.saxon.pattern.Pattern
getDefaultPriority, getStaticContext, make, make, setStaticContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirstElementPattern

public FirstElementPattern()
Method Detail

testFilters

protected boolean testFilters(NodeInfo node,
                              Context c)
                       throws org.xml.sax.SAXException
This testFilters() method simply tests whether the node is the first element matching the name test
Overrides:
testFilters in class LocationPathPattern

toString

public java.lang.String toString()
Description copied from class: LocationPathPattern
Return the pattern as a string
Overrides:
toString in class LocationPathPattern