Authoring SGML DTD's with GELLMU

William F. Hammond

September 28, 1998

It is certainly not a new idea that SGML markup can be used
to manage many things including, in particular, SGML
DTD's. (For the moment, I am at a loss to find a publicly
visible example.)

The extensible nature of GELLMU
(Generalized Extensible LaTeX-Like MarkUp)
is rooted in the fact
that GELLMU may be used to author SGML documents.

It follows, inasmuch as GELLMU may be used to prepare an
SGML document, that it may be used to prepare an SGML
document that is used to generate an SGML DTD.

The following included verbatim segment is the text of a simple
GELLMU document "prexdt.glm" that flows in one step,
i.e., GELLMU stage 1, to "prexdt.sgml". It is followed
by a copy of the DTD for a simple SGML document type that
I have named ``dtd''. "prexdt.sgml" is a document
under the ``dtd'' document type. With a small collection of
stage 3 codelets for sgmlspl, one may then generate
"prexdt.dtd", which is the third included verbatim segment
below.

Of course, if this is to make any sense, it must follow that
"boot.dtd" can itself be authored with the document type
that it defines, and that is, indeed, the case.

About the GELLMU verbatim command

Since GELLMU documents are amenable for processing to many
ultimate target formats, including possible future formats, it is
essential to make verbatim sections safe. This means that verbatim
sections cannot be prepared in the way that a LaTeX
``verbatim environment'' is prepared. Even the HTML
"pre" command -- for pre-formatted text -- requires the
preparer to escape the characters `<',
`>', and `&' where they occur in
the pre-formatted material.

There are two reasonable ways to handle verbatim material in a
GELLMU system:

Prepare the material, as for HTML, for direct inclusion
in the SGML image of a GELLMU document.

Filter the material to use symbolic character names for any
character that is not strictly alpha-numeric before inserting
the material inside a GELLMU verbatim command.