Hi, [Andreas] > This should indeed be handled better, but your FO is actually very dubious... > In fixed-layout, the number of columns and their respective widths are > ultimately determined based on > the cells in the first row. There is no obligation for an implementation of > XSL-FO to even process the > offending cells in the next rows...
It appears that I've been thinking about that recently. In the current code, the number of columns of a table is the maximum number of columns in the first rows of: - the table-header, if any; - the table-footer, if any; - each (and every!) table-body. AFAIK it is specified nowhere in the Recommendation how this number of columns should actually be computed. The CSS2 spec doesn't tell anything about this either. In the HTML 4.01 specification, it is stated that (adapted to FO vocabulary) if there are fo:table-columns elements, they fix the number of columns, otherwise this is the number of columns in the row having the most columns. We could mimic the HTML specification to a certain extent, that is: - if table-columns are specified, they fix the number of columns and any row having more columns would be considered erroneous; - otherwise, I see two possibilities: - either we use the row which has the most columns; this would have a potentially heavy impact on memory consumption since the table would have to be read in its entirety. IIC that's already the case today, but if we are to implement some producer-consumer model as we recently discussed about this will become noticeable. But that would be a nice-to-have for users who don't care about memory consumption or for simple tables. All the more than if they do care, they would just have to add fo:table-columns objects. - or we do as currently, that is rely on the first rows of each table-header/footer/body. But then we would have to take only the first table-body into account, to avoid a bad impact on memory. I'm personally in favor of the first solution, because it provides means to satisfy everyone: speed as well as flexibility. WDYT? Vincent