By William F. Hammond |
September 28, 1998 |
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. �
_________________________________________________________________________________________________________________________
prexdt.glm: |
�\documenttype[boot.dtd]{dtd} �\doctype{test} �\dtdref{prexdt.dtd} �\cmt{A�Test�DTD} �\cmt{Does�the�recommended�usage�match�this? ���<!DOCTYPE�test�SYSTEM�"prexdt.dtd"> �} �\begin{document} �\elt{test}{oo}{(preamble,body)} �\elt{preamble}{rr}{(a)} �\elt{body}{rr}{((p|t)*)}{����BETTER} �\enp{ts}{a|p} �\elt{(\%ts)}{rr}{(#PCDATA)*} �\elt{t}{rr}{((r)+)} �\elt{r}{oo}{((c)+)} �\elt{s}{oo}{(i,(c)*)} �\elt{c}{oo}{(#PCDATA)*} �\elt{i}{oo}{(#PCDATA)+} �\end{document} |
_____________________________________________________________________________
boot.dtd: |
�<!--�Use�<!DOCTYPE�dtd�SYSTEM�"boot.dtd">�--> �<!--�Use ������<!DOCTYPE�dtd�SYSTEM�"boot.dtd"> ��--> �<!ELEMENT�doctype�-�-�(#PCDATA)�--�the�name�of�the�document�type, �����i.e.,�the�name�of�the�root�element�(which�needs�to�be�defined)�--> �<!ELEMENT�dtdref�-�-�(#PCDATA)�--�the�(unquoted)�system�resource�name ����of�the�DTD�to�be�used�with�documents�of�the�type�"doctype";�this ����name�is�only�used�to�generate�a�comment. ����Example:�for�this�DTD:��doctype�=�dtd���dtdref�=�boot.dtd�--> �<!ENTITY�%�dtd�"elt|enp|ent|empt|cmt"> �<!ENTITY�%�tags�"rr|ro|or|oo"> �<!ENTITY�%�charr�"spc|cma|per|ltc|gtc|qum|sol|col|scl|quo|lsq|rsq"> �<!ENTITY�%�charn�"lbr|rbr|exc|atc|hsh|dol|pct|crt|amp|ast|lpr|rpr|und"> �<!ENTITY�%�chare�"lsb|rsb|hyp|eqc|plu|vbr|bsl|tld"> �<!ENTITY�%�chara�"%charr|%charn|%chare"> �<!ENTITY�%�charh�"rdash"> �<!ENTITY�%�chars�"%chara|%charh|brk"> �<!ENTITY�%�eos�"eos|eoq|eoe"> �<!ELEMENT�(%eos)�-�O�EMPTY�--�ends�of�sentence�made�by�GELLMU�--> �<!ELEMENT�(%chars)�-�O�EMPTY�--�33�printable,�non-alphanumeric�--> �<!ELEMENT�(%tags)�-�O�EMPTY�--�the�tag�requirement�combinations�--> �<!ENTITY�%�string�"#PCDATA|%chars"> �<!ELEMENT�ag0�-�-�(%string|%eos)*�--�command�argument�--> �<!ELEMENT�dtd�O�O�(preamble,�body)> �<!ELEMENT�preamble�-�-�(doctype,dtdref,(cmt)*)�--�zero�or�more�comments�--> �<!ELEMENT�body�-�-�(%dtd)*> �<!ELEMENT�elt�-�O�(ag0,ag0,ag0,(ag0)*)�--�element: ��������������name,�tags,�defn,�comments?�--> �<!ELEMENT�enp�-�O�(ag0,ag0,(ag0)*)�--�parameter�entity: ��������������name,�defn,�comments?�--> �<!ELEMENT�ent�-�O�(ag0,ag0,(ag0)*)�--�general�entity: ��������������name,�defn,�comments?�--> �<!ELEMENT�empt�-�O�(ag0,(ag0)*)�--�empty�element: ��������������name,�comments?�--> �<!ELEMENT�cmt�-�-�((%string|%eos|verb)*)�--�comment�--> �<!ELEMENT�verb�-�-�((%string|%eos)*)�--�inline�verbatim,�OK�in�cmt�--> |
_____________________________________________________________________________
prexdt.dtd: |
�<!--�Use�<!DOCTYPE�test�SYSTEM�"prexdt.dtd">�--> �<!ELEMENT�test�-�-�(#PCDATA)�--�name�of�root�tag> �<!--�A�Test�DTD�--> �<!--�Does�the�recommended�usage�match�this? ���<!DOCTYPE�test�SYSTEM�"prexdt.dtd">�--> �<!ELEMENT�test�O�O�(preamble,body)> �<!ELEMENT�preamble�-�-�(a)> �<!ELEMENT�body�-�-�((p|t)*)�--�����BETTER�--> �<!ENTITY�%�ts�"a|p"> �<!ELEMENT�(%ts)�-�-�(#PCDATA)*> �<!ELEMENT�t�-�-�((r)+)> �<!ELEMENT�r�O�O�((c)+)> �<!ELEMENT�s�O�O�(i,(c)*)> �<!ELEMENT�c�O�O�(#PCDATA)*> �<!ELEMENT�i�O�O�(#PCDATA)+> |
_____________________________________________________________________________
About the GELLMU verbatim command |
There are two reasonable ways to handle verbatim material in a GELLMU system:
_________________________________________________________________________________________________________________________
About GELLMU |
[Processed from GELLMU to LATEX on Fri Oct 2 16:36:29 EDT 1998]