New HTML 4.0 Table stylesheet

Subject: New HTML 4.0 Table stylesheet
From: Chris Maden <crism@xxxxxxx>
Date: Mon, 27 Oct 1997 17:58:53 -0500
What's new:

o Supports multiple TBODYs and the RULES="GROUPS" specification.
o Creates paragraph flow objects in TDs or THs that are mixed content
  or empty.
o Supports percentage specification for TABLE WIDTH attribute.

I think I'm done with this stylesheet for now.  Percentage values for
column widths will require, I think, polling all of the columns and
determining how many (table-unit)s to set.  For example:

<table width="160">
<col width="20">
<col width="25%">

requires table-columns of 20pt, 40pt, and 100pt; or 20pt, (table-unit
2), and (table-unit 5) (or multiples thereof).  Someone more
masochistic than I is *more* than welcome to implement that.  Remember
that, if the table specifies no width, it uses (display-size) - in the
*<table>'s* context, not the <col>'s - and that <colgroup>s also need
to be accomodated.  Have fun!

The RTF back-end has problems with some arrangements of empty cells; a
fix from James is appended.

A zip file is available at
<URL:>; see
<URL:> for
more info and pointers to individual files.  Note that the URL has
changed, but old URLs should redirect appropriately.  This won't be
available until some time after midnight when the Web site is updated;
send a HEAD request if you're not sure if it's changed yet.

;; DSSSL stylesheet for HTML 4.0 (97-09-17 draft) tables
;; Created for the W3C XML WG by Christopher R. Maden of O'Reilly and
;;    Associates (crism@xxxxxxxxxxx).
;; The cellpadding attribute needs to be handled by cell contents.
;; The construction rule for P should be deleted when this is included
;;    in the context of a full HTML stylesheet; it is present only to
;;    handle content of sample tables and to give an example of
;;    handling cellpadding.
;; This does not handle the SPAN attribute on the COL element, as Jade
;;    appears to crash on n-columns-spanned: on a table-column.
;; Assumes only LTR content.
;; Assumes that column width specifications are in pixels, and can be
;;    converted to points at one point per pixel.
;; WIDTH and HEIGHT set directly on table cells is not supported.

*** RtfFOTBuilder.cxx.orig      Thu Aug 21 15:00:44 1997
--- RtfFOTBuilder.cxx   Mon Oct 27 15:52:17 1997
*** 3023,3028 ****
--- 3023,3030 ----
        os() << "\\sa" << accumSpace_;
+   else if (inlineState_ == inlineFirst)
+     os() << "\\intbl";
    accumSpace_ = 0;

<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL> <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>

 DSSSList info and archive:

Current Thread