WWW Meets FrameMaker
I have just completed the first steps in integrating FrameMaker and the World Wide Web. You can now create, read, modify, and write web documents using FrameMaker. Soon, you should be able to use FrameMaker as a global hypertext browser.
Daniel W. Connolly <firstname.lastname@example.org>
Theory of Operation
FrameMaker supports an interchange format
and an integrated conversion facility. See p. D-16 of FrameMaker Reference
for full documentation.
Basically, whenever you open or save a file (in MIF format), if the filename matches a suffix list, Frame invokes a shell script that can convert the file on the fly.
I modified the supplied MifRead
script to recognize HTML. Files ending with .html are filtered them through fix-html.pl
, which brings conventional HTML files into SGML conformance. Then sgmls parses the file using html.dtd
. (sgmls does a pretty good job of tolerating errors in SGML instances.)
and the xlisp interpreter convert the sgmls output to Maker Markup Language. Finally, MifRead calls FrameUs mmltomif to generate the MIF file that FrameMaker will read.
I modified the supplied MifWrite
to convert MIF files saved with the .html extension to HTML. The xlisp program mif2html.l
does the whole conversion.
Hypertext Constructs in Frame and WWW
FrameMaker supports hypertext references using markers with MType=8 (Hypertext in the dialog box.) The active text is everyting from the marker to the next font change before and after the marker.
Associated with the marker is a text string. FrameMaker defines a set of hypertext commands. See p. 3-8 of FrameMaker Reference
Three of the commands are supported by the www_and_frame package: gotolink, newlink, and message.
The syntax of gotolink is
which are translated to anchor start tags of the form:
The syntax of newlink is
which I translated to
The syntax of message is
message clientname string
which, if clientname is www, I translated to
The catch is that you have to put the hypertext marker at the beginning of the anchor text. If you put it in the middle, Frame will recoginze the whole anchor, but these tools will only recognize the text between the marker and the next font change.
The inverse translations arenUt as fully functional. They currently map
message www h
The result is that target anchors are generally lost on input. This should be fixed shortly.
The www_and_frame package
The www_and_frame.tar.Z file will be available via anonymous ftp shortly from info.cern.ch in the pub/WWW/src directory.
zcat www_and_frame.tar.Z | tar xvf -
should properly install the package in a directory called .fminit2.0.
The LISP interpreter: xlisp by David Betz
Grab export.lcs.mit.edu:/contrib/winterp/xlisp/xlisp-2.1.almy.tar.Z via anonymous FTP. Then apply the patches in diffs_from_almy21. These patches prevent xlisp from writing diagnostics to stdout where they will be mixed in with conversion output.
Then build it using the included directions. You may have to tweak it a little for your system.
IUd like to make this package a little more ANSI/POSIX conformant if I get time. But for now, youUll have to do the typical Makefile editing.
The SGML parser: sgmls by James Clark
Grab ifi.uio.no:/pub/SGML/SGMLS/sgmls-0.8.tar or ftp.uu.net:/pub/text-processing/sgml/sgmls-0.8.tar.Z
This package is extremely high quality. It includes a configure shell script, and it is largely ANSI/POSIX compliant. It builds without modification on all the systems IUve tried.
Try It Out!
Load the test file into FrameMaker
Be sure you have the following requirements met first:
Then start FrameMaker, chose open from the File menu and select test.html. FrameMaker will consult the suffixes file, and upon finding the html entry, it will run MifRead. MifRead will invoke fix-html.pl to bring test.html into SGML conformance. Then it will invoke sgmls to parse the file, and html2mml.l to convert the parsed SGML to Maker Markup Language. Finally, mmltomif is invoked to build an importable file.
- The .fminit2.0 directory from the www_and_frame package is in the current directory or in your home directory.
- The suffixes file in that directory has an entry for html.
- The MifRead shell script in the fminit directory checks for html processing.
- The fix-html.pl perl script is executable and in your $PATH.
- The sgmls parser is executable and in your $PATH.
- The html.dtd file is in the current directory or accessible via the SGML_PATH envariable. (See the sgmls man page for details.)
- The html2mml.l lisp program is in the current directory.
You should be able to edit the file normally. Use only the paragraph tags in the catalog. You can, however, change any attributes of those tags.
You can add hypertext links by adding FrameMaker hypertext markers. For the marker text, the "gotolink foo:bar" and "newlink bar" syntaxes are supported. Plus, use "message www scheme://host/path#anchor" for full WWW addresses.
You will have to lock the file to use the hypertext links interactively. (use ESC-F-l-k to lock/unlock the file.)
Save the test file in HTML format
When you want to save the file, be sure these requirements are met:
Then just chose Save As... and be sure the extension is .html. Click the Maker Interchange Format option, and click OK. Frame will invoke MifWrite, which will invoke the mif2html.l lisp program.
- The MifWrite shell script is in the .fminit directory and checks for html processing.
- The xlisp interpreter is executable and in your $PATH.
- The mif2html.l lisp program is in the .fminit2.0 directory.
The resulting file should be acceptable to the www browsers.
Updates to the HTML DTD
For the functionality that I implemented, no changes to the WWW code are necessary. HTML files and programs that generate HTML do require changes.
The FrameMaker integration is based on the premise that WWW will become an SGML compliant application. I am using the DTD that I proposed recently
with some modifications to closely parallel HTML.c from the distributed code. I also consulted the proposed HTML2 definition
script should bring most existing HTML files into compliance.
The documentation for FrameMaker includes Integrating Applications with FrameMaker, which desciribes a mechanism where arbitrary RPC clients can be invoked from hypertext commands.
That is, the incantation
message www http://info.cern.ch/hypertext/WWW/MarkUp/HTML2.html
could make an RCP call to a WWW client that would retrieve the indicated document and instruct FrameMaker to display that file.
This would turn FrameMaker into a global hypertext browser.
- Sometimes FrameMaker hides the paragraph tag in with the paragraph formatting in the MIF file. mif2html.l fails to recognize this situation. Hence the bogus </NIL> tag at the beginning of documents.
- Names of anchors are lost on conversion to MIF. This is just laziness.
- I didnUt convert FrameUs extended ASCII character set to anything sensible. Quotes will look funny.
- Traditionally, SGML systems verify documents on input and assume validity on input. This system does the reverse. I should verify output documents.
- I once had a keyboard macro rigged up for saving as MIF. ItUs kind of a pain to make about five clicks every time you want to save.
- MIF ReferenceFrame Technology Corporation1010 Rincon CircleSan Jose, California 95131Part Number 41-01037-00April 1991
- FrameMaker Reference
- FrameMaker ReferenceFrame Technology Corporation1010 Rincon CircleSan Jose, California 95131Part Number 41-00524-00Septermber 1990