There are two classes of problems regarding the style sheet language: styles that fit the model but that are difficult to implement because of the way typical window systems work, and styles that are needed but that don't seem to fit the model.
The `model' in this case is the mechanism of attaching local properties to SGML elements in the form of a static `rendering table'. For the first class of problems the question is mainly: can we do without this style and if not, can we specify it in such a way that applications can find alternative ways of displaying the data. For the second class of problems the question is how to extent the model with the least disruption.
Titles or headers in a table might be displayed sideways or diagonally. If rotated text is allowed, then rotated rules should be allowed as well.
Large initials, or `dropcaps', can be specified as a boolean (use them for this paragraph or not), as a size (so many sizes larger than the body text), as a combination of several styles (font family, style, size), etc. However, implementation is difficult for a number of reasons:
The paragraph may have so few lines that the initial is too large.
It's very difficult to know the shape of the letter. For good visual quality, the lines next to the letter should follow the shape of the letter. Also, some letters have so much empty space at their left side that they should be shifted somewhat to the left: J, T.
In some cases, the first letter is not a good candidate: quotes, parentheses. The best solution for a quote is to put the quote in the left margin and enlarge the next letter.
Related to the large initials is the style in which the whole first line of a paragraph is printed in capitals or larger than the rest. A variation of this is to enlarge only the first few words.
Numbering items in a list is not difficult, but continuing the numbers in the next list is. Numbering headers without enclosing containers, as is possible in HTML, is also a problem, since H1, H2, 3tc, all need different counters. They even need to be combined: section 2.3, chapter 5A, etc. Counters must either be passed on from element to element via common ancestors, or all counters must be global.
Example with global counters:
<OL> <LI>Europe <OL> <LI>Germany <OL> <LI>Köln <OL> <LI>Dom <LI>Hauptbahnhof ... </OL> <LI>Karlsruhe ... </OL> <LI>Norway ... </OL> <LI>Africa ... </OL>
*OL : count2=0 *OL LI : count2=count2+1, label=count2 *OL*OL : count3=0 *OL*OL LI : count3=count3+1, label=count2++"."++count3 *OL*OL*OL : count4=0 *OL*OL*OL LI : count4=coubt4+1, label=alpha(count4) *OL*OL*OL*OL : count5=0 *OL*OL*OL*OL LI: count5=count5+1, label=alpha(count4)++"-"++Roman(count5)
1 Europe 1.1 Germany a Köln a-I Dom a-II Hauptbahnhof ... b Karlsruhe ... 1.2 Norway ... 2 Africa ...
Another use of global counters is when the page is printed with numbered footnotes.
(As the example shows, a sequential implementation must ensure that the counters are evaluated before the labels are formed.)
Since the width of the image isn't know when the caption is set, the width of the caption will have to be estimated. Another possibility is to use two passes: when the image is found, the width of the floating paragraph is fixed and the page is formatted again.
(Back) to style sheet overview
Bert Bos, 23 May 1995