Re: Docbook 5 html table colgroup / cols problem

Hussein Shafie <[email protected]>
Newsgroups gmane.editors.xxe.general
Message-ID <[email protected]>
On 4/26/20 9:44 PM, Martin Goik wrote:
> Consider the following Doocbook 5.1 html style (Not CALS) informaltable:
> 
> <informaltable border="1">
>        <colgroup width="40%"/>
>        <colgroup width="60%"/>
> 
>        <tr>
>          <td>left</td>
>          <td>right</td>
>        </tr>
> </informaltable>
> 
> The Xmleditor table plugin allows for conveniently resizing table
> columns using mouse dragging thereby adjusting @width values
> accordingly. However when converting the instance to PDF using the
> built-in Fop processor these values are not being honored at all: All
> columns appear with equal width regardless of any <colgroup> settings. I
> tinkered using fop1.extensions=1 and other parameters to no avail.
> 
> However when replacing <colgroup> by <col> elements the PDF result
> correctly reflects all parameter values:
> 
> <informaltable border="1">
>        <col width="40%"/>
>        <col width="60%"/>
> 
>        <tr>
>          <td>left</td>
> 
>          <td>right</td>
>        </tr>
> </informaltable>
> 
> Unfortunately using the mouse  for column drag next time reverts back to
> using<colgroups>. And any <col> child entries of <colgroup> get purged
> as well.
> 
> Though having searched thoroughly for conversion parameters I might miss
> something.
> 


It's not a FOP issue. You would get different but still incorrect 
results using XEP or XFC. It's a DocBook XSL stylesheets issue which is 
well known by us, here at XMLmind Software.

The problem is that the DocBook XSL stylesheets does not support HTML 
tables as well as it supports CALS tables.



Now about resizing the table columns by dragging the mouse in XXE. Yes, 
XXE exclusively uses colgroups for that (and also for anything related 
to HTML table columns) because of the HTML standard:
---
4.9.1 The table element
...
Content model:
     In this order: optionally a caption element, followed by zero or 
more *colgroup* elements, followed optionally by a thead element, 
followed by either zero or more tbody elements or one or more tr 
elements, followed optionally by a tfoot element, optionally intermixed 
with one or more script-supporting elements.
...
---
https://html.spec.whatwg.org/multipage/tables.html#the-table-element

Yes, we are talking about DocBook but the HTML standard says that a 
table is really supposed to directly contain colgroups and not cols.

Therefore the issue you report about column resizing is not a bug we 
plan to fix.



Please report the PDF conversion bug (XSL-FO transformation bug in fact) 
to the maintainers of the DocBook XSL stylesheets.

Meanwhile, please stick to CALS tables. That's what we do here at 
XMLmind Software.





--
XMLmind XML Editor Support List
[email protected]
https://www.xmlmind.com/mailman/listinfo/xmleditor-support
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.