code: public void traverse(int pos) throws org.xml.sax.SAXException
    {
      // %REVIEW% Why isn't this just traverse(pos,pos)?
  
      int top = pos;		// Remember the root of this subtree
  
      while (DTM.NULL != pos)
      {
        startNode(pos);
        int nextNode = m_dtm.getFirstChild(pos);
        while (DTM.NULL == nextNode)
        {
          endNode(pos);
  
          if (top == pos)
            break;
  
          nextNode = m_dtm.getNextSibling(pos);
  
          if (DTM.NULL == nextNode)
          {
            pos = m_dtm.getParent(pos);
  
            if ((DTM.NULL == pos) || (top == pos))
            {
              // %REVIEW% This condition isn't tested in traverse(pos,top)
              // -- bug?
              if (DTM.NULL != pos)
                endNode(pos);
  
              nextNode = DTM.NULL;
  
              break;
            }
          }
        }
  
        pos = nextNode;
      }
    }
docs: Perform a non-recursive pre-order/post-order traversal,
  operating as a Visitor. startNode (preorder) and endNode
  (postorder) are invoked for each node as we traverse over them,
  with the result that the node is written out to m_contentHandler.
  
  @param pos Node in the tree at which to start (and end) traversal --
  in other words, the root of the subtree to traverse over.
  
  @throws TransformerException