Readers of this list may be interested in the following message, which
was posted this evening to comp.text.sgml.
Jon
------------------------------------------------------------------------
Newsgroups: comp.text.sgml
Subject: DSSSL style sheet for HTML 3.2 hardcopy
Below is a first attempt at a DSSSL (dsssl-o) style sheet for
producing hardcopy output from documents validated against the HTML
3.2 DTD. It supports most of the features of HTML 3.2 that make any
sense in printed form and adds a couple of features of its own,
notably headers, footers, and the autonumbering of heads and table
captions.
The style sheet was tested using an alpha version of James Clark's
DSSSL engine. Since precompiled binaries of the alpha were available
only for Windows 95, that was the platform for which the style sheet
was written. Very minor and obvious adjustments should be sufficient
to adapt it to other platforms. Thanks are due to Anders Berglund for
putting together the foundation of the style sheet, and of course to
James Clark for taking the time to answer a number of foolish
questions and for producing yet another basic piece of the Grand
Solution.
Since this style sheet is my first attempt to write in DSSSL, Scheme,
or any other functional language, I would be grateful for suggestions
on how to improve it.
Jon
---
Jon Bosak, Online Information Technology Architect
SunSoft, 2550 Garcia Ave., MPK17-101, Mountain View, CA 94043
A Davenport Group Sponsor -- see http://www.ora.com/davenport/
------------------------------- cut here --------------------------------
<!doctype style-sheet system "style-sh.dtd">
;; ######################################################################
;;
;; DSSSL style sheet for HTML 3.2 print output
;;
;; 1996.07.18
;;
;; Jon Bosak, SunSoft, based on work by Anders Berglund, EBT,
;; with critical assistance from James Clark
;;
;; ######################################################################
;; Features in HTML 3.2 that are not implemented in the style sheet:
;;
;; automatic table column widths
;; % on width attribute for TABLE
;; attributes on TH and TD: align, valign, rowspan, colspan
;; attributes on TABLE: width, align, border, cellspacing, cellpadding
;; start attribute on OL
;; value attribute on LI
;; noshade attribute on HR
;;
;; See also "Non-Printing Elements" below
;;
;; Features in the style sheet that are not in HTML 3.2:
;;
;; page headers that display the HEAD TITLE content
;; page footers that display the page number
;; optional autonumbering of heads and table captions
;; support for named units (pt, pi, cm, mm) in size attributes
;; ============================== UNITS ================================
(define-unit mm .001m)
(define-unit cm .01m)
(define-unit in 25.4cm)
(define-unit pi (/ 1in 6))
(define-unit pt (/ 1in 72))
(define-unit px (/ 1in 96))
;; see below for definition of "em"
;; =========================== PARAMETERS ==============================
;; Visual acuity levels are "normal", "presbyopic", and
;; "large-type"; set the line following to choose the level
(define *visual-acuity* "normal")
;; (define *visual-acuity* "presbyopic")
;; (define *visual-acuity* "large-type")
(define *bf-size*
(case *visual-acuity*
(("normal") 10pt)
(("presbyopic") 12pt)
(("large-type") 24pt)))
(define *mf-size* *bf-size*)
(define-unit em *bf-size*)
;; these font selections are for Windows 95
(define *title-font-family* "Arial")
(define *body-font-family* "Times New Roman")
(define *mono-font-family* "Courier New")
(define *dingbat-font-family* "Wingdings")
;; these "bullet strings" are a hack that is completely dependent on
;; the Wingdings font family selected above; consider this a
;; placeholder for suitable ISO 10646 characters
(define *disk-bullet* "l")
(define *circle-bullet* "