numEndTags = 0; numStartTags = 0;
    public void insert(int offset, int length, ElementSpec[] data,                       DefaultDocumentEvent ev)    {      if (length == 0)        return;      this.offset = offset;      this.length = length;      this.endOffset = offset + length;      documentEvent = ev;      // Push the root and the paragraph at offset onto the element stack.      elementStack.clear();      elementStack.push(root);      elementStack.push(root.getElement(root.getElementIndex(offset)));      numEndTags = 0;      numStartTags = 0;      insertUpdate(data);    }