author: Michel Dagenais
copyright: Michel Dagenais, GNU General Public License, 1997
michel.dagenais@polymtl.ca

Ecole Polytechnique

C.P. 6079, Succ. Centre-Ville

Montreal, Quebec, H3C 3A7
date: 8 October 1997
keyword: HTML
keyword: SGML
keyword: documentation
keyword: m3tosgml
keyword: medium audience

Sgmltom3: From HTML back to Modula-3 Interfaces

Abstract

This program converts back to Modula-3 an HTML file produced by m3tosgml. It may be used to edit the HTML documentation, embedded into Modula-3 comments, using an HTML editor.

The program sgmltom3 reads the HTML input file (first command line argument, standard input when no argument given), interprets the SGML tags with the attribute CLASS set to m3tosgml.xxx (xxx being one of the subcommands skip, comment2, skiptag, quote, bquote, startProg, and display), and writes the corresponding Modula-3 unit to the output file (second command line argument, standard output when no argument given).

It is useful when some processing is performed on the HTML translation of the Modula-3 file, and the result needs to be put back into the original Modula-3 file. A prime example is to use an HTML editor for the documentation embedded into the Modula-3 comments (convert to HTML with m3tosgml, use an HTML editor, convert back with sgmltom3); this assumes that the special attribute values (CLASS=m3tosgml.xxx) placed by m3tosgml are not altered by the HTML editor.