10.1. Editors

One of the most important parts of any DocBook authoring suite is the editing environment since this is where the author spend most of the time in the document production process. It is possible to author DocBook documents in a plain text editor but this does not give the user the benefits as syntax highlighting, auto-indentation and spell-checking. Therefore it is imperative to find an editor that is comfortable and maximises productivity.


Vi is only available on Unix. Vim works on MS-Windows, Macintosh, Amiga, OS/2, VMS, QNX and other systems. And also on every Unix system. Vim offers syntax highlighting for over 200 languages. And if that's not enough, you can define your own syntax. Vim is free! It is open source with a charityware license.

VIM which stands for vi improved is a vast improvement on the original Unix editor, GUI version is called GVIM. This is the editor that I personally use as I personally feel comfortable with its speed and utility. It has syntax highlighting for XML and SGML modes. It has a relatively steep learning curve however and takes a while to get reasonably proficient at for most people. But VIM also has an "easy" mode which makes it feel like your typical "dumb" editor yet it still has all the power of VIM behind it.


To quote the Emacs Manual: “Emacs is the extensible, customizable, self-documenting real-time display editor.” Emacs (name derived from Editor MACroS), is a text editor with an emacs lisp core. It is easier than Vi to get started with and it is also the editor of choice for many Universities and educational institutes, there have been many a flame war over the issue of VI vs EMACS. It has a PSGML mode which can be setup to author DocBook with syntax highlighting and Norman Walsh has produced a DocBook IDE major mode which incorporates extensive features such as automatic completion of end tags and insertion of elements. Emacs has an ispell/Aspell plug-in to enable spell checking on-the-fly. It is available for just about any operating system. GUI capable versions are available. Emacs is released under the GPL (its free).


To quote the FAQ:

ThotBook is (will be) a visual editor for DocBook, based on ThotLib. ThotBook will allow users to visually edit DocBook documents using a graphical interface and will allow them to import/export their work into structured DocBook SGML/XML. ThotBook will help to produce valid structured DocBook documents without having to learn the DocBook syntax. ThotBook will respect document structure, as opposed to "WYSIWYG" editors, which produce (mostly) unstructured documents.

It is only available via CVS at the moment but should be one to watch for users who like visual interfaces.


EpcEdit is a commercial GUI editor for Unix and Windows, it has many features such as integrated enhanced validating XML/SGML parser, to quote the website:

epcEdit provides a structure-sensitive view of XML or SGML documents and allows editing of a document while keeping it in conformance with the document's DTD. An integrated table editor helps in visualizing the layout of tables conforming to the CALS or HTML table models. The hierarchical structure of a document is represented by a tree view that is updated while the document changes.


Xeena, a visual XML editor, is a generic Java application for editing valid XML documents derived from any valid DTD. XML files can be created and edited without learning the intricacies of XML. The editor takes as input a given DTD and automatically builds a palette containing the elements defined in the DTD. Any document derived from that DTD by using a visual, tree-directed paradigm can thus be created, edited, or expanded. The visual paradigm requires only a minimal learning curve, because only valid constructs or elements are presented to the user in a context-sensitive palette.

The above quote is according to the website, I installed it and tried it out and it looked OK but I took it no further. As far as licensing goes, it appears that the software is free for "Independent development", but what this means is unknown by me at the moment. It is platform independent.

There are quite a few editors available and there is likely to be a lot more in the future. Keep an eye out. Here is a short list of some others, all descriptions are taken from the websites indicated, all rights reserved.

  • http://www.morphon.com/xmleditor/index.shtml

    The Morphon XML-Editor is a validating XML-Editor which lets you easily create and modify XML documents. Morphon also provides a CSS editor for use as a styling language. The Editor itself is able to run on the maximum number of platforms as it is written in Java, and uses the Java Foundation Classes (JFC) Libraries.

  • http://www.xmlmind.com/xmleditor/

    XMLmind XML Editor (XXE for short) is an XML editor featuring DTD-aware editing commands and a word processor-like view configured using W3C's cascading style-sheets (CSS).

  • http://fabrice.bellard.free.fr/qemacs/

    QEmacs (for Quick Emacs) is a very small but powerful UNIX editor....WYSIWYG DocBook mode based on XML/CSS2 renderer.