code: public boolean add(Element element) throws DocumentException {
          if (close) {
  			throw new DocumentException(
  				"The document has been closed. You can't add any Elements.");
          }
  		if (!open && element.isContent()) {
  			throw new DocumentException(
  				"The document is not open yet; you can only add Meta information.");
          }
          boolean success = false;
          DocListener listener;
          if (element instanceof ChapterAutoNumber) {
          	chapternumber = ((ChapterAutoNumber)element).setAutomaticNumber(chapternumber);
          }
  		for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
              listener = (DocListener) iterator.next();
              success |= listener.add(element);
          }
  		if (element instanceof LargeElement) {
  			LargeElement e = (LargeElement)element;
  			if (!e.isComplete())
  				e.flushContent();
  		}
          return success;
      }
docs: Adds an <CODE>Element</CODE> to the <CODE>Document</CODE>.
  
  @param element
  the <CODE>Element</CODE> to add
  @return <CODE>true</CODE> if the element was added, <CODE>false
  </CODE> if not
  @throws DocumentException
  when a document isn't open yet, or has been closed