- From: Jon Bosak <bosak@atlantic-83.eng.sun.com>
- Date: Sat, 4 May 1996 10:28:54 -0700
- To: Chris.Lilley@sophia.inria.fr
- Cc: cwilso@microsoft.com, www-style@w3.org
[Chris Lilley, preceded by a snippet from Chris Wilson:]
| > In comparing CSS and
| > DSSSL, it seems that CSS is easier for most non-technical authors to
| > understand, so if they HAVE to hand author a style sheet, I believe it
| > would be easier for them to do in CSS.
|
| I suspect you are right, there, although it is difficult to do
| comparisons. Perhaps someone such as Jon could post the DSSSL-O
| translation of the 'default HTML 2.0' stylesheet at the back of the
| CSS-1 spec, to facilitate such comparisons.
As I've explained previously, without an experimental dsssl-o tool,
I'm helpless to provide anything; I'm not one of those people who can
start coding just from the formal description of a language. The fact
that we have no such tool is partly due to the fact that W3C has put
all of its stylesheet implementation resources into advancing CSS to
the exclusion of other possibilities; but this is a rant for another
occasion.
I agree that it would be useful to have a dsssl-o version of the
default HTML 2.0 stylesheet at the back of the CSS1 spec. While no
such thing exists at present, I did some rooting around and came up
with something similar that was written, I believe, by James Clark a
year or so ago. It obviously doesn't correspond point-for-point with
the stylesheet in the CSS draft, and it was written so long ago (about
a year before the DSSSL standard was published) that it might not even
be exactly in accord with the final version of the standard, but it
does give a feel for what a dsssl-o version of the default stylesheet
might look like if we had one. I reproduce my copy of that file below.
Jon
---
Jon Bosak, SunSoft 2550 Garcia Ave., MPK17-101, Mountain View, CA 94043
A Davenport Group Sponsor http://www.ora.com/davenport/README.html
========================================================================
<PLAINTEXT>
<!doctype dsssl public "-//SGML Open//DTD DSSSL Style Sheet//EN">
<unicode>
<style>
;; Users can adapt the style-sheet to their preferences by
;; overriding these definitions.
;; Implementations would map these font family names onto the appropriate
;; system dependent names.
(define serif-font-family
"ISO/IEC 10179:1995//Font Family::Serif")
(define sans-serif-font-family
"ISO/IEC 10179:1995//Font Family::Sans Serif")
(define mono-font-family
"ISO/IEC 10179:1995//Font Family::Monospace")
(define text-font-size 12pt)
(define very-large-font-size 36pt)
(define large-font-size 24pt)
(define big-space-before 24pt)
(define big-space-after 24pt)
(define block-space-before 8pt)
(define block-space-after block-space-before)
(sd (make sequence
font-family-name: serif-font-family
font-size: text-font-size))
(element h1
(make paragraph
font-size: very-large-font-size
font-weight: 'bold
quadding: 'center
space-before: big-space-before
space-after: big-space-after
(sosofo-append
(literal
(format-number (child-number) "1"))
(literal ". ")
(process-children))))
(element h2
(make paragraph
font-size: large-font-size
font-weight: 'bold
space-before: big-space-before
space-after: big-space-after
(sosofo-append
(literal
(format-list (element-number-list "H1" "H2")
"1"
"."
"1")
". ")
(process-children))))
(element code
(make sequence
font-family-name: mono-font-family))
(element u
(make score
type: 'after)) ; after in line-progresssion direction
(element strike
(make score
type: 'through))
(element var
(make sequence
font-posture: (if (equal? (inherited-font-family-name)
mono-font-family)
'oblique
'italic)))
(element strong
(make sequence
font-weight: 'bold))
(element samp
(make sequence
font-family-name: mono-font-family))
(element pre
(make paragraph
verbatim?: #t
font-family-name: mono-font-family
space-before: block-space-before
space-after: block-space-after))
(element (ul li)
(make paragraph
start-indent: (+ (inherited-start-indent) 30pt)
first-line-start-indent: -30pt
space-before: list-item-space-before
(make line-field
field-width: 30pt
field-align: 'start
(literal (case (nesting-level "ul")
((1) "\bullet")
((2) "\square")
(else "-"))))
(make paragraph)))
(element (ol li)
(make paragraph
start-indent: (+ (inherited-start-indent) 30pt)
first-line-start-indent: -30pt
space-before: list-item-space-before
(make line-field
field-width: 30pt
field-align: 'start
(literal
(format-number (child-number)
(case (nesting-level "ol")
((1) "1")
((2) "a")
((3) "i")
(else "1")))))
(make paragraph)))
(element dl
(make paragraph
first-line-start-indent: (- (/ (- (display-size)
(inherited-start-indent)
(inherited-end-indent))
3))
start-indent: (+ (/ (- (display-size)
(inherited-start-indent)
(inherited-end-indent))
3)
(inherited-start-indent))
space-before: list-space-before
space-after: list-space-after))
(element dt
(sosofo-append
(make paragraph-break)
(make line-field
field-width: (- (inherited-first-line-start-indent))
field-align: 'start
space-before: list-item-space-before)))
(element hr
(make rule
orientation: 'horizontal))
(element br
(make sequence
break-before: 'line))
(element address
(make paragraph
font-posture: 'italic))
(element blockquote
(make paragraph
start-indent: (+ (inherited-start-indent) 10pt)
end-indent: (+ (inherited-end-indent) 10pt)))
(element head
(empty-sosofo))
</style>
Received on Saturday, 4 May 1996 13:29:55 UTC