Class AttributeIterator

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

public class AttributeIterator extends ChildTestIterator
This class implements an optimized iterator for attribute axes patterns.
  • Constructor Details

    • AttributeIterator

      AttributeIterator(Compiler compiler, int opPos, int analysis) throws TransformerException
      Create a AttributeIterator object.
      Parameters:
      compiler - A reference to the Compiler that contains the op map.
      opPos - The position within the op map, which contains the location path expression for this iterator.
      Throws:
      TransformerException - if any
  • Method Details

    • getNextNode

      protected int getNextNode()
      Get the next node via getNextXXX. Bottlenecked for derived class override.
      Overrides:
      getNextNode in class ChildTestIterator
      Returns:
      The next node on the axis, or DTM.NULL.
    • getAxis

      public int getAxis()
      Returns the axis being iterated, if it is known.
      Specified by:
      getAxis in interface DTMIterator
      Overrides:
      getAxis in class ChildTestIterator
      Returns:
      Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types.