lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lout to HTML


From: Jin S. Choi
Subject: Re: Lout to HTML
Date: Wed, 13 Nov 1996 19:34:47 -0500

I've had some recent experience in SGML to lout conversion. First, a
disclaimer: I'm neither a lout expert nor an SGML expert. In fact, I'm
rather quite new to both of them.

The tools I was using were the linuxdoc sgml tools based on the sgmls
parser. These consist of a LaTeX-like DTD and a set of mapping files
for a bunch of different output formats. I extended the DTD and added
a lout backend (don't ask for it, it's very very special purpose).

My experience was that the simple tag replacement model of the sgmls
translation process wasn't a good fit for lout, or at least, lout the
way I used it. The problem was things like @BeginSections and friends,
metalevels implicit in the DTD that were required to be explicitly
stated by lout. I ran into this in several places, and I while I feel
the problem was due more to the simplistic nature of the SGML tools
than to lout, the fact that @BeginSections is required didn't make
things any simpler.

There are several solutions to this problem. The cleanest would be to
use DSSSL to rewrite the document tree to give you the structure you
want, then do the tag replacement on the rewritten tree. This route
was not taken due to lack of time to learn DSSSL and the lack of
ready-to-use tools (SP, the successor to sgmls, does a little DSSSL,
but nobody's packaged it up nice yet).

Another relatively clean solution would be to make all implicit levels
explicit (so instead of having something like "a: b, c*" you would
have "a: b, d" and "d: c*"), and use tag minimization to avoid having
to key in all those new levels. Here, the problem was that I was
pushing the parser's limits already with this DTD, and couldn't add
new elements easily. Also, I'm not very sure of myself with SGML and
didn't want to break things too badly.

Yet another way to do this would have been to use lout as a very low
level formatting language, skipping all the higher level structuring
stuff if it became unruly and just writing formatting statements. As
I'm still in the "skimming the user's manual for what I need" stage, I
didn't feel prepared to do this. A variant of this, which I think
would be very interesting, would be a set of lout commands "tuned" to
a particular DTD, to make translation more straightforward.

What I ended up doing for the job at hand was resorting to awful
special case hacks that you don't want to hear about. As better tools
become available for SGML and DSSSL in the future, I'm looking forward
to having another try at creating a nice system for portable document
generation.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]