Eric van der Vlist wrote:
> I am struggling to implement the frame/colsep/rowsep control of HTML
> tables in a DocBook like vocabulary in CSS.

First of all, note that support of XHTML tables in DocBook 4.3 will be 
implemented in V2.8p1 (We are in a hurry to release V2.8, and we 
unfortunately cannot spend time on this in V2.8).



> The issue I have is that when colsep or rowsep are set to one, I need to
> be able to override the values of the row or cell border control on the
> edges depending of the value of the "frame" attribute.
> 
> In other words, I need to be able to reverse the usual CSS inheritance
> mechanism for tables.
> 
> If I have understood the spec correctly, the border style "hidden" is
> what CSS has imagined for this type of situations, unfortunately, this
> value isn't supported by XXE.
> 
> For simple cases (ie when colspan and rowspan are equal to one for each
> cell in the table) I have found a workaround playing with transparent
> border colors, but that doesn't work in the general case when rowspan or
> colspan aren't always equal to one.  
> 
> Do you see any way to implement that in CSS without "style: hidden" (as
> far as I understood, XXE supports that feature for DocBook through
> Java)?
> 
> Or is there any hope to get "style: hidden" implemented in a near
> future?

(May be I'll say stupid things in the email. If this is the case, please 
correct me. We have implemented table rendering a long time ago and I 
don't remember very well what we did and why we did it that way.)

XXE only supports the separated borders model. That is, the only way to 
specify borders is to specify them around individual cells (i.e. not 
around rows, not around row groups).

Adding a border on a specific side of a cell is achieved by specifying, 
for example, "border-bottom-color:black;" (this adds a line at the 
bottom of the cell).

Suppressing a border on a specific side of a cell is achieved by 
specifying, for example, "border-top-color:transparent;" (this 
suppresses the line at the top of the cell).

When the logic of specifying borders around cells becomes too 
complicated to be specified using pure CSS, you need to code a 
StyleSheetExtension in Java (see 
http://www.xmlmind.com/xmleditor/_distrib/docs/dev/ar01s07.html).

This is what we have done for DocBook and XHTML (and for a custom schema 
implemented for one of our customers).

Now, this being said, you can quickly and easily style tables using pure 
CSS without necessarily rendering all their visual attributes. Suffice 
to convince your users to accept the fact that, in that case, tables are 
not fully WYSIWYG in XXE.


Reply via email to