Class ReverseAxesWalker

All Implemented Interfaces:
Cloneable, SourceLocator, PathComponent, SubContextList, ExpressionNode, XPathVisitable

public class ReverseAxesWalker extends AxesWalker
Walker for a reverse axes.
See Also:
  • Field Details

    • m_iterator

      protected DTMAxisIterator m_iterator
      The DTM inner traversal class, that corresponds to the super axis.
  • Method Details

    • setRoot

      public void setRoot(int root)
      Set the root node of the TreeWalker. (Not part of the DOM2 TreeWalker interface).
      Overrides:
      setRoot in class AxesWalker
      Parameters:
      root - The context node of this step.
    • detach

      public void detach()
      Detaches the walker from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state.
      Overrides:
      detach in class AxesWalker
    • getNextNode

      protected int getNextNode()
      Get the next node in document order on the axes.
      Overrides:
      getNextNode in class AxesWalker
      Returns:
      the next node in document order on the axes, or null.
    • isReverseAxes

      public boolean isReverseAxes()
      Tells if this is a reverse axes.
      Overrides:
      isReverseAxes in class PredicatedNodeTest
      Returns:
      false, unless a derived class overrides.
    • getProximityPosition

      protected int getProximityPosition(int predicateIndex)
      Get the current sub-context position.
      Overrides:
      getProximityPosition in class PredicatedNodeTest
      Parameters:
      predicateIndex - The index of the predicate where the proximity should be taken from.
      Returns:
      The node position of this walker in the sub-context node list.
    • countProximityPosition

      protected void countProximityPosition(int i)
      Count forward one proximity position.
      Overrides:
      countProximityPosition in class PredicatedNodeTest
      Parameters:
      i - The index into the m_proximityPositions array, where the increment will occur.
    • getLastPos

      public int getLastPos(XPathContext xctxt)
      Get the number of nodes in the node list, which, in the XSLT 1 based counting system, is the last index position.
      Specified by:
      getLastPos in interface SubContextList
      Overrides:
      getLastPos in class AxesWalker
      Parameters:
      xctxt - The XPath runtime context.
      Returns:
      the number of nodes in the node list.