[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] padding


Subject: Re: [xsl] padding
From: "Nikolai Grigoriev" <grig@xxxxxxxxxxx>
Date: Tue, 6 Nov 2001 13:12:32 +0300

Gustaf,

> No error but no result either:
> 
> <fo:table-column column-width="15%" padding="0.5em"/>

Strictly speaking, there is no such thing as padding on table columns.
A quote from XSL Rec:

XSL>   6.7.4. fo:table-column
XSL>   ...
XSL>   The following properties apply to this formatting object:
XSL>   * Common Border, Padding, and Background Properties
XSL>      Only the background properties from this set apply. If the value 
XSL>      of border-collapse is "collapse" or "collapse-with-precedence" 
XSL>      for the table the border properties also apply. 

You have to specify padding on single cells, rather than on columns.

XSL Recommendation provides a means to specify features on the column
via from-table-column() function. However, I am not sure if any 
XSL FO implementation supports it; ours (XEP) still lacks this feature.
In any case, it would be as verbose as specifying explicit padding
on each cell:

<fo:table-column column-width="15%" padding="0.5em"/>
...
<fo:table-cell padding-left="from-table-column()" 
                 padding-right="from-table-column()">...

(The presence of from-table-column() function explains why padding
is permitted by the DTD. It is correct to have any attribute on
fo:table-column, but most of them will be used only in expressions 
that contain 'from-table-column()', and never applied directly).

> For some reason, the general 'padding' 
> attribute doesn't show up in 7.7. Common Border, Padding, 
> and Background Properties.

'Padding' is a shorthand, listed in a special section of the spec
(7.29.15 "padding"). 

Best regards,
Nikolai




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords
xsl