code: @Override
      public boolean hasNext() {
  
          // first return all values of the first operand
          while (mOp1.hasNext()) {
              mOp1.next();
  
              if (getNode().getDataKey() < 0) { // only nodes are
                  // allowed
                  throw new XPathError(ErrorType.XPTY0004);
              }
              return true;
          }
  
          // then all values of the second operand.
          while (mOp2.hasNext()) {
              mOp2.next();
  
              if (getNode().getDataKey() < 0) { // only nodes are
                  // allowed
                  throw new XPathError(ErrorType.XPTY0004);
              }
              return true;
          }
  
          return false;
      }
docs: {@inheritDoc}