Re: Processing instructions for style tweaks?

Daniel W. Connolly ([email protected])
Tue, 29 Nov 1994 22:50:37 -0600


In message <[email protected]>, Steven J. DeRose writes:
>I'm generally opposed to PIs, though Dan's made a pretty good
>case for them in the exceptional case, and I'm probably convincable.

I agree that this is something of a hack.

But the market is demanding presentational control. They're willing
to sacrifice document structure for it, in many cases.

> So I'd tweak the syntax to have a prefix,
>maybe something like "<?DL (...)>"

OK. This motion has been made and now seconded. I was gonna put
it in the original proposal, but I omitted it for clarity... or something.

Anyway... this is clearly a good idea.

>More importantly,
>The processing model will be considerably simpler if you put
>the PI right *after* the start-tag, not before: that way it exists
>at the scope to which it applies.

Now that I think about it, this is simpler.

>The biggest problem I see with this is that it might possibly
>encourage "tag abuse syndrome" (Dave Raggett's term, I think?)
>rather than discourage it as intended. People could use no tags
>but <html>...</html> and do everything with flat PIs -- gak!

They will do whatever causes them the least pain and hassle. I hope
that browsers will become more picky about element structure (i.e. I
hope they'll support less non-conforming stuff). But no browser
implementor is going to make it impossible to do stuff that Mosaic
does currently. So processing instructions can fill the gap.

I wager that it will be simpler in _most_ cases to use tags
than PIs. Consider:

<?DL (space-before: 2x font-size: 24pt font-weight: 'bold)>
A Heading

<?DL (space-before: 1x font-size: 12pt font-weight: 'medium
start-indent: 3em end-indent: 3em)>
First paragraph

vs.

<H1>A Heading</h1>

<p> First Paragraph

The only time I could imagine seeing the former is from some
RTF-to-SGML converter that just transliterated the presentation info.

Dan