Re: tables html dsssl HELP!

Subject: Re: tables html dsssl HELP!
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxx>
Date: Fri, 10 Oct 1997 15:13:17 -0400
At 11:16 97/10/10 -0700, Billy Mahoney wrote:
>2x2 table with borders around all the elements. Can anyone
>help me? Here's what I attempted...

Your use of the table-row and table-cell flow objects was incorrect, as the
table-cell objects were not nested as children of the table-row objects;
you have the table-cell objects as children of the table object.

You can build a hard-wired table without using child elements by nesting
flow objects in table-cells in table-rows in tables (the nesting is
important).  Be aware of inadvertently processing the table element
children more than once by not correctly watching the implicit use of
(process-children) ... this is the most common mistake I've seen in class.

Here is a canned example I have that may help.  This table is 2x2 with
thick table borders and thin cell borders.  It is data driven through
nested table elements in the SGML source rather than being hard-wired in my
DSSSL script using fixed cell contents.

.......... Ken

C:\data\KenData\course\PFUD\Develop\exer>type samp3.sgm
PUBLIC "+//ISBN 1-894049::CSL::Courses::PFUD//DOCUMENT Sample 3 Source//EN"
Copyright (C) Crane Softwrights Ltd.
<!ELEMENT t - O ( r+ )      -- table  -->
<!ELEMENT r - O ( c+ )      -- row    -->
<!ELEMENT c - O ( #PCDATA ) -- column -->

C:\data\KenData\course\PFUD\Develop\exer>type samp3.dsl
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
PUBLIC "+//ISBN 1-894049::CSL::Courses::PFUD//DOCUMENT Sample 3
Copyright (C) Crane Softwrights Ltd.

(element t                      ;the processing of the table element
    (make table
        table-border:  (make table-border line-thickness: 3pt)
        (make table-column width: 1in)  ;all columns before any rows
        (make table-column width: 2in)
        (process-children)))            ;child elements make row flow objs

(element r                      ;a row in the table
    (make table-row
        (process-children)))    ;child elements make cell flow objects

(element c                      ;a column in the row
    (make table-cell
        cell-before-row-border:    #t
        cell-before-column-border: #t
        (process-children)))    ;content of the table cell

; end of file


G. Ken Holman            mailto:gkholman@xxxxxxxxxxxxxx
Crane Softwrights Ltd.
1605 Mardick Court, Box 266,         V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0         F: +1(613)489-0995
PGP Privacy:

 DSSSList info and archive:

Current Thread