Re: CSS and SGML document formatting

On Tue, 23 Apr 1996 00:37:50 +0200, you wrote:

>CSS is probably only useful for formats that are `similar' to HTML,
>which means something like: it is a document that already contains all
>the text the reader will see, and the text is already in the right
>order (modulo things like floating images). The layout depends on the
>element names and their nesting, not on their order (although we will
>probably have to extend CSS a little in that direction.)

There have been some replies to my original post stating that CSS is
not fit to handle any type of SGML and that DSSSL is the thing to use.
Maybe I have been a bit unclear. I wasn't implying that CSS could or
should be extended to handle any kind of SGML document. I do not think
that SGML should be extended to handle any kind of typographical
requirement.

But IMO CSS may well be extended to handle the class of SGML documents
described above by Bert Bos. But this is a very common and important
class (let's call them "sequential" documents)! 

In particular: I anticipate that there will be a lot of documents
designed to be published in the end on the Web, but still containing
special elements, attributes and structure (e.g. specialized supersets
of HTML or DTDs using parts of HTML to represent generic text).

For documents based on such DTDs it should be possible to specify
formatting using "extended" CSS.

>
>Making CSS suitable for other types of document will mean major
>changes.
>
>If it turns out that there are document formats that need important
>reshuffling of elements, than a possible approach is to add a DSSSL
>interpreter to the formatter; just the DSSSL tree transformer might be
>enough.

Why? Use the DSSSL tree transformation to cross-convert to a
sequential document and apply CSS formatting. So DSSSL needs not be
part of the formatter. Or use Omnimark or another tool for the cross
conversion.

Or (and I think this will be the most common case in the future) you
do not have a document needing reshuffling but have the contents of a
SGML-DBMS. You use the functions of the DBMS to do the reordering and
content generation and export the result as a sequential document.

>
> > In particular: Is there material on the extension necessary to
> > transport the semantics now implicit in HTML (e.g. BR is empty and
> > rendered as a line break, H1 is a heading, etc.)?
>
>The fact that BR is empty cannot be found in the style sheet, but must
>be extracted from the DTD. The fact that H1 is a heading is a semantic
>notion that is too abstract for the style sheet. The style sheet can
>only try to make the H1 more visible.
>

Why is this too abstract? Currently it cannot be expressed in CSS,
that's true. But if you introduce a property like 'heading-level' you
can have a rule

	H1 { heading-level: 1 }

which will cause the formatter to apply corresponding
default-formatting and to put the contents into the TOC if there is a
TOC.

To wrap it up: I think, that CSS can and should be extended to cover 
- the formatting of sequential documents (no reordering, context based
on element stack and possibly of left-sibling-, first-child- or
something like that-relationships),
- using formatting features found in common word processors (Word/WP).

Regards

Wolfgang Rieger

Buero fuer Software-Entwicklung           Email: rieger@bse.de
                                          WWW  : http://www.bse.de/
Rosenheimer Str. 214                      Phone: +49 89 497738	
81669 Munich, Germany                     Fax  : +49 89 497738

Received on Friday, 26 April 1996 10:10:05 UTC