Automated SGML Markup
Instructions for Download and Use
These instructions are based on the system this was written on, an IBM RS6000 running AIX3.1 and httpd 1.4.
1. Set up a directory structure
Mu uses three directories: muroot, which you must be able to run cgi scripts from, and a raw and a cooking directory. Muroot is the where all the scripts are stored (this may be your cgi-bin directory, or it may be somewhere else). The raw directory contains the sgml template file (more on this in a second). The cooking directory is where the marked up SGML files will be stored. Make these three directories and ensure that they are writeable by your web server.
Why does raw have it's own directory if it is only one file?
2. Unpack mu.tar.Z
Mu is a simpler version of a set of scripts originally written for a specific project at IATH. Raw is a separate directory because the front end page was designed to handle several different parts of the project's DTD.
Download mu.tar.Z if you haven't already and save or move it into the muroot directory from step 1. Now uncompress and untar that file in that directory (use "uncompress mu.tar.Z" and "tar -xvf mu.tar", for example). Depending on your sever, you may need to rename mu.pl to mu.cgi. You may want to move instruc.html and mu.html somewhere else, also. Make sure all the scripts in muconfig are executable by your web server.
3. Tweak muconfig.pl
Now you need to tell muconfig where your directories are. Open muconfig.pl with your favorite editor, and change $MuRoot, $Raw and $Cooking to the positions of the directories you made. Also, change $Template to the name of the file you are using as a template, i.e. header.raw.sgml.
You can also customize the header and tail that gets printed out each time in this file. Make sure not to delete the open and first print statement in Header().
4. Tweak mu.html
Change the first line of the form in mu.html to the URL for MuRoot.
5. SGML template
Put your sgml template file in the raw directory.
What is the deal with the template, already?
The SGML template (for example, the one from the demo) that mu uses is simply a copy of the sgml file with no contents, a few extra switches, and a somewhat kloogey <end> tag at the very end of it that has to be there for reasons you don't want to know about. The template must have all close and open pairs, and at this point, attributes are not handled correctly (until this is fixed, strip out the attribs and put them in a separate tag pair- the output from this thing is most certainly going to need to be filtered to be compliant with your DTD, anyway). Where attributes normally are, instead you can tuck one of three switches (-, + and *) into the tag, like this:
The function of the switches is to give you control over the display of the form on the screen and to allow repeatable elements:
"+" gives you a multiple line, wrapping (use Netscape 2.0- this doesn't work with 1.1) text box, as opposed to the default single line. The size of this box can be set in muconfig.pl.
Thus, the example above would produce a form that looks like this, although this one doesn't work (hitting the buttons will just reload this page. You can try it if you want.):
"-" suppressing the display of an input box altogether (typically used at the beginning of a block of tags).
"*" allows a block of tags to be repeatable. A block is defined as the tags from the starred tag to the close of that tag, inclusive.