code: @Override
      public final boolean hasNext() {
  
          // assure, that preceding is not evaluated on an attribute or a
          // namespace
          if (mIsFirst) {
              mIsFirst = false;
              if (getNode().getKind() == IConstants.ATTRIBUTE
              // || getTransaction().isNamespaceKind()
              ) {
                  resetToStartKey();
                  return false;
              }
          }
  
          resetToLastKey();
  
          if (!mStack.empty()) {
              // return all nodes of the current subtree in reverse document order
              moveTo(mStack.pop());
              return true;
          }
  
          if (((ITreeStructData)getNode()).hasLeftSibling()) {
              moveTo(((ITreeStructData)getNode()).getLeftSiblingKey());
              // because this axis return the precedings in reverse document
              // order, we
              // need to travel to the node in the subtree, that comes last in
              // document
              // order.
              getLastChild();
              return true;
          }
  
          while (getNode().hasParent()) {
              // ancestors are not part of the preceding set
              moveTo(getNode().getParentKey());
              if (((ITreeStructData)getNode()).hasLeftSibling()) {
                  moveTo(((ITreeStructData)getNode()).getLeftSiblingKey());
                  // move to last node in the subtree
                  getLastChild();
                  return true;
              }
          }
  
          resetToStartKey();
          return false;
  
      }
docs: {@inheritDoc}