code: public void setRoot(int root)
    {
      // %OPT% Get this directly from the lpi.
      XPathContext xctxt = wi().getXPathContext();
      m_dtm = xctxt.getDTM(root);
      m_traverser = m_dtm.getAxisTraverser(m_axis);
      m_isFresh = true;
      m_foundLast = false;
      m_root = root;
      m_currentNode = root;
  
      if (DTM.NULL == root)
      {
        throw new RuntimeException(
          XSLMessages.createXPATHMessage(XPATHErrorResources.ER_SETTING_WALKER_ROOT_TO_NULL, null)); //"\n !!!! Error! Setting the root of a walker to null!!!");
      }
  
      resetProximityPositions();
    }
docs: Set the root node of the TreeWalker.
  (Not part of the DOM2 TreeWalker interface).
  
  @param root The context node of this step.