Chapter 5. PSGML and TDTD

Table of Contents
Get the files
Install PSGML
Install TDTD
The first steps with PSGML
Further Reading
Summary
Turn Emacs into a powerful SGML/XML editor

The PSGML major mode allows the Emacs user to create and edit SGML and XML documents. PSGML is context-aware after parsing the document's document type definition (DTD). For example, commands like Markup->Insert Element offer only those elements or attributes which are allowed at the cursor position. This makes it much easier to write valid SGML documents, although it does not contain a validating parser. We will add validating parsers in later chapters of this tutorial.

As HTML is simply one (the best known, though) SGML application, it is tempting to use the PSGML mode for editing HTML files. We will therefore add some code which derives a HTML mode from PSGML.

TDTD is another Emacs major mode. This one turns Emacs into a DTD editor. This makes it easy to author and edit custom DTDs.

Get the files

  1. PSGML-1.2.4. Follow the link to the released files and download the archive file.

  2. TDTD