Norm's ShowDocument program


Design


This program is a poor replacement for a browser. I chose to do it for a couple of reasons. One I don't know how to call the default browser from a program. And two I don't know how to pass an HTML file that's in a jar file to a browser. This program solves both problems.

Usage

Call ShowDocument with the filename of the HTML file to be displayed. For example:

    new ShowDocument(someDoc.html);

If its called without any arguments, you'll see this page.

Writing HTML documents

ShowDocument supports a small subset of HTML. If it finds a syntax error or doesn't recognize a tag, it will display an error message on the console and exit. Comments (<-- ... -->) are scanned over.
Digits following the # in & variables are scanned as hexadecimal. For exampleL &#21; would be the ! character.

Supported HTML tags:

Intermediate data

This program has two parts: the parser and the displayer. The parser reads HTML and creates a table of Document elements which the displayer then reads to create the display. The intermediate table of Document Elements can be saved in a file with the extension: NPH by using the -wrtNPH option when calling ShowDocument. This file can be passed to ShowDocument as a filename for it to display without having to parse.

Last modified January 12, 2001