code: public void setShouldCacheNodes(boolean b)
    {
  
      if (!isFresh())
        throw new RuntimeException(
          XSLMessages.createXPATHMessage(XPATHErrorResources.ER_CANNOT_CALL_SETSHOULDCACHENODE, null)); //"Can not call setShouldCacheNodes after nextNode has been called!");
  
      m_cacheNodes = b;
      m_mutable = true;
    }
docs: If setShouldCacheNodes(true) is called, then nodes will
  be cached.  They are not cached by default. This switch must
  be set before the first call to nextNode is made, to ensure
  that all nodes are cached.
  
  @param b true if this node set should be cached.
  @throws RuntimeException thrown if an attempt is made to
  request caching after we've already begun stepping through the
  nodes in this set.