Re: How prescriptive can/should we be? [Was: DL content model ]

Earl Hood (
Wed, 16 Nov 94 18:19:26 EST

> The idea behind PRE was that it's preformatted: the information
> provider is specifying the exact layout of the characters. Inside PRE,
> you might as well give the exact font too. Outside PRE, this is a
> no-no.

I see PRE as "honor spaces and line breaks." This has nothing to do
with fonts. I find it perfectly reasonable to use EM and STRONG
elements in PRE since the author does not care how text get
"emphasized" or "strongized" (ugly word), but only that the lines and
spaces be preserved.

One thing I can see that is important for an author when using the
PRE element is character spacing. For a code example, an author would
like to make sure that fixed character spacing is used. While for
a poem, it might not matter.

An attribute could be added to the PRE element, lets call it SPACING
for sake of discussion (even though it is probably not the right
term). Here's a sample SGML declaration for it:

<!ATTLIST PRE SPACING (fixed|proportional|default) default>

"default" reflects the current setting of the HTML viewer; which
is more-in-likely fixed spacing.

For a example code section, the following can be used to insure
fixed spacing:

int main(void)
/* .... */

For text, like a poem, spacing probably doesn't matter, so the default
setting of the HTML viewer can be used:

There once was a man from Nantucket

Currently, all WWW clients use a fixed-width font for PRE sections, so
the above will not break existing clients or cause people to change all
their HTML docs.

I think I'm rambling ...

> 2. Should I change the DTD to allow IMG inside PRE?

Yes. It is common practice. Plus, as an author, I might want to make
sure that 2 images appear side-by-side for comparison.