Program: DTA2HTML.EXE

Description: A VX-REXX program that converts Describe documents to HTML code.

NOTE: It is assumed that the user has a basic knowledge of HTML before using this program. HTML tutorial can be found at many places on the internet or in books available from any bookshop.

Usage: First, your Describe document must meet certain requirements: there must be no pictures or text frames (other than the main one), including footnotes/endnotes. Use the Frame Manager to remove these. Images can be inserted by placing the exact HTML code in the correct position.

To place literal HTML: Create a root style called "Literal" (make sure it is at the root of the tree - it will appear at the very left of the Style Palette) and use it on all code that is to be placed literally. All <, > and & will be placed as is, without being interpreted into &lt;, &gt; and &amp;. Make sure you place <BR> and <P> markers correctly. The program is supposed to convert DeScribe's paragraph and end-of-line breaks from being converted to carriage return/line feed (irrespective of position of <P> and <BR>), but a bug that we can't trace is preventing this. If you have any multi-line Literal HTML in your document, you will have to bring the resulting HTML file up in a simple text editor and search for <eol> and <ep>, and replace them with CR/LF. Just an aside: I find it useful to define Literal to be in Courier font, to resemble Netscape's method of placing preformatted text (with the <PRE> and <XMP> tags), which is similar to the way DTA2HTML interprets Literal Text.

All of Describe's special characters, like bullet, ellipsis, en-dash and em-dash, will be translated to other characters during export to DTA. It's safer if you remove all these - Web browsers might interpret them incorrectly.

The main body style at the root of the style tree. For example, I use Document as a root, and underneath it, styles for Head 1, Head 2, Bulleted List, and so on.

Once you have a document in this kind of simple format, save it in Describe Tagged ASCII (DTA) format. (In the Save As... dialog, DTA is one below DeScribe in the Formats box at the bottom).

Once the document is saved in DTA format, exit Describe. Drag the saved file onto the DTA2HTML.EXE icon to run the program. We suggest that you use OS/2's Associations to simplify this job.

The program will start with the name of your document in the first entry field as a confirmation that it is looking at the right file. Use full path and file name please.

Next entry field contains path and name for the HTML file. A default of "C:\DESKTOP\C.HTM" starts in the entry field. Change it if you want to.

The third entry field contains the title for the HTML file. This is what goes between the <TITLE> and </TITLE> tags, which is displayed in the title bar of the Web Browser. The default is "Testing...".

The piece of static text under the title is for the colours used by the document. Press the Set button at right to change them.

Next comes a special feature: character conversion. If you used any special characters in your document, such as daggers, you can replace them with a piece of HTML code instead. We us this feature for the placement of small images in place of special DeScribe characters, as seen by the default text, which changes ASCII Character 14 (musical note) to a small animating GIF which says "New!", along with an Alternative Text.

There are two entry fields, first for a source character, then for a target string. This will be placed in place of every occurrence of the source character. Press the OK button to accept the character conversion string. If you made a mistake, double click on its entry in the list box, and it will be removed and placed in the entry fields for you to correct.

Then comes a nice feature: DTA2HTML has a feature whereby you can save your style definitions. This is very useful for people who use a fixed style tree for several documents: instead of defining them every time, you can simply define them once and then use the style-save file for quick conversion every subsequent time. Enter a full path and name at the prompt to both load and save the file. The style-save format is straight text, so you can easily fix up any errors you make.

Last entry field: you must enter the name of the root of the style tree. Document is used as the default.

If you want to save your preferences, the two buttons at the bottom of the window can save and load a response file. You can also drag and drop files onto the buttons to do the same job.

Preparation completed! Press the large "Begin Conversion!" botton and you can sit back and let DTA2HTML do its job. Well, not quite. Every time it comes upon a style opening tag, it prompts with a message like "Enter definition for Document\Head 1:" Type in exact HTML code to be used, eg <CENTER><H1>. Then it prompts "Enter ending definition:". The script makes a good guess (based on the opening tag) of the relative closing tag, but leaves the final decision to the user. Simply press enter to accept the good guess. Both the opening and closing tags will be stored in memory to replace the style definition when it comes again in this document.

DeScribe has several tags available that do not translate directly to HTML, such as double-underline. You will have to use these in a style and make an approximation to <U>. Some simple tags are added by the program: If, for instance, you have defined a MajorHead style to be all caps, the text will not be capitalised in the DTA file. However, if you define the MajorHead style to be <CENTER><H1><CAP>, then DTA2HTML with capitalise the MajorHead text as it is processed.

Author's apologies: the conversion loop is rather slow, especially on large documents. The progress indicator will show that the program has not hung.

When the program terminates, you should find a complete, useable HTML file. If not, contact me and tell me about any bugs.

One last warning: The characters > and < are used as controls by the program. Please don't use them in DeScribe's internal controls, as they will interfere with the program. This includes style names. However, in the body of the document they will be interpreted correctly.

NOTE: Do not attempt to run anything else while DTA2HTML is converting. It will run VERY slowly. We don't know why, because the CPU monitor shows only about 8% usage. Sincere apologies.

This file was created in DeScribe and converted with DTA2HTML. The DeScribe and DTA source files are included.