Trevor Nash wrote:
> Is this a bug in XXE or in the documentation?
The problem that you report is subtle. It is an undocumented limitation
rather than a bug. See below.
> The docs say (CSS 4.11) that both display:block and display:table can be
> made collapsible. But I can only get blocks to work, see the attached
> files.
Note that I've received no attached files.
> The section element collapses OK, but the table1 elements do not
> - the collapser does nothing. If I change the table1 to display:block
> the collapser works (though of course the table layout is lost).
>
> The only example I can find of a collapsible "table" is in DocBook - but
> on closer inspection the table element is styled display:block and it is
> the tgroup element which is display:table. So this is a collapsible
> block containing a table, rather than a collapsible table in its own right.
>
What you say about DocBook tables is right. However, elements styled
using "display:table;" may be made collapsible.
Let's take XHTML for example. In XHTML, tables having a caption are made
collapsible.
---
table {
display: table;
border-style: solid;
border-width: 1;
margin-top: 1.33ex;
margin-bottom: 1.33ex;
}
caption {
display: table-caption;
font-style: italic;
color: #804040;
text-align: center;
margin-left: 2ex;
margin-right: 2ex;
margin-top: 1.33ex;
margin-bottom: 1.33ex;
}
[...]
table {
collapsible: yes;
not-collapsible-head: 1;
collapsed-content: url(xxe-config:common/icons2/table.gif);
collapsed-content-align: center;
}
caption:before {
content: collapser() " ";
}
---
(Please open XXE_install_dir/demo/xhtml-table.xhtml and check this by
yourself.)
Now how does this work? When you add a caption to a table, XXE
automatically creates an *anonymous* *block* containing both the caption
and the table. It is this block which may be made collapsible.
Therefore you are right: only blocks, whether explicitly created (i.e.
"display:block;") or implicitly created, are collapsible.
We'll document this limitation in next version.