In this paper we describe a step that improves the quality of an SGML document by enhancing the structure of the document based on content. The process we described accepts as input valid SGML documents, and produces as output valid SGML documents of higher quality. While this specific program is tailored towards the PCIS DTD, the methods are here applicable to any arbitrary document type definition. Throughout this paper we refer to the actual code that can be found in the appendix by line numbers. The methods described in here make use of two unique features of OmniMark, context translation and referents.
Referents are buffers that can be output before their final value is known.
In this paper we show how these two features can be combined to achieve three traditionally hard tasks, turning implicit references into explicit references, content based transformation, and rearrangement of blocks. Throughout the paper we refer to the actual OmniMark code that is included in the appendix. The basis of the code described in here is a simple normalizer. The SGML domain outputs the SGML using an implied element rule. To make the input more readable appropriate indentation is added.