Re: Formatting CALS tables

Subject: Re: Formatting CALS tables
From: Jany Quintard <quintard.j@xxxxxx>
Date: Wed, 21 Jul 1999 09:32:05 +0200 (MEST)
On Tue, 13 Jul 1999, joseph, Gershon wrote:

> I am having difficulty in matching the various CALS elements to the DSSSL
> table flow object classes. I searched the archives and only found how to
> .../...
> I have tried reading the DSSSL standard, and can't see how to specify a row
> as header (<thead> element) or body row (<tbody> element).
I am not sure my answer is what you are looking for, but, with my DTD,
which is not so far from DocBook, I do this :
----------------------------------------------------------------
; example : three parts table
; tables are created from tgroup (not from table)
  (element tgroup
    (make table space-before: *tableSpaceBefore*
                space-after: *tableSpaceAfter*
      (make table-part content-map: '((thead header)
                                      (tbody #f)
                                      (tfoot footer)))))

  (element thead 
    (make sequence label: 'thead
      (process-children)))

  (element (thead row)
    (make table-row font-weight: 'bold
                    quadding: 'center
      (process-children)))

  (element tbody
    (make sequence label: 'tbody
                    quadding: 'start
      (process-children)))

  (element (row entry)
    (make table-cell 
      (make paragraph
            quadding:
              (if (equal? (attribute-string "align") "RIGHT")   'end
              (if (equal? (attribute-string "align") "CENTER")  'center
              (if (equal? (attribute-string "align") "JUSTIFY") 'justify
                                                                'start
              )))
        (process-children-trim))))
-------------------------------------------------------------------
This allows to have three distinct parts which behave differently on page
breaks and so on.

Hope it helps.

Jany.



 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread