Emacs PSGML mode tips

From: Mark Galassi <rosalia@galassi.org>
Sender: owner-sgml-tools@via.ecp.fr
To: sgml-tools@via.ecp.fr
Subject: Re: dtd parser!
Date: Fri, 23 Oct 1998 09:19:01 -0600 (MDT)

    Jose> My question is: Is there any available tool (parser) to
    Jose> analyse a dtd and return the same informations that is
    Jose> contained in the reference manual?

There are a few.  The one I use is emacs with PSGML mode.  It has
emacs-style completion *on tags*!!  It's really cool.

If you type "C-c C-e" it will prompt you for an element, and offer as
completions only the valid elements at that point.

Once it inserts the element, it inserts it with any required following 
elements along with a comment saying which ones you could put later
on.

As an example, I just went to a DocBook buffer and typed

C-c C-e variab<SPACE BAR><RETURN>

and it inserted this text in the buffer:

    <variablelist>
      <varlistentry>
	<term></term>
	<listitem>
	  <!-- one of (epigraph authorblurb abstract highlights comment bridgehead anchor sidebar procedure msgset table figure example equation informaltable informalexample informalequation graphicco graphic blockquote address simpara para formalpara funcsynopsis cmdsynopsis synopsis screenshot screenco screen programlistingco programlisting literallayout warning tip note important caution variablelist simplelist segmentedlist orderedlist itemizedlist glosslist calloutlist) -->
	</listitem>
      </varlistentry>
    </variablelist>

Another example:

C-c C-e i<SPACE BAR>

and it showsme the following completions:

----

Click mouse-2 on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
important			   indexterm
informalequation		   informalexample
informaltable			   itemizedlist

----