On Wed, 2004-10-13 at 11:24, Hussein Shafie wrote: > 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
Great! > (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). Hmmm... I am not sure I understand this statement: defining borders around rows seems to work pretty well! > 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). Yes, that's what I have done. That's working pretty well with the DocBook/XHTML model as long as you do not use colspan/rowspan attributes that mess up everything (at least in the absence of border: hidden support. The issue when you start using colspan/rowspan attributes is that I don't see how you can compute row and column positions to decide which border should be drawn using CSS selectors. The other approach that would work in "pure" CSS is for each cell to decide if the borders should be drawn depending on table/@colsep and table/rowsep and to override that for the outer border as defined by table/@frame using border: hidden when needed. That seems pretty straightforward, thus my question : would you consider implementing that CSS feature? :-) ... > 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). That's what I feared :-( ... > 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. Yes, I'll check with my customer if that can be an option. Thanks, Eric -- Tired of typing XML tags? http://wikiml.org ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------

