Does anyone happen to know why the arbitrary nesting of tables is prohibited, or if any updates to the CALS standard are under consideration on this topic? I don't really understand the original motivations behind the standard, but not being able to nest tables seems pretty restrictive.
-----Original Message----- From: Bob Stayton [mailto:b...@sagehill.net] Sent: Tuesday, March 02, 2010 3:51 PM To: maxwell; docbook@lists.oasis-open.org Subject: Re: [docbook] informaltable inside table Hi, I consulted with the DocBook Technical Committee, and found that it is a bug that table is allowed in entry elements. Allowing table violates the Cals table standard that DocBook adheres to. This will be corrected in the next release of the DocBook schema. The only solution I have is to use HTML table markup instead of Cals table markup. The <td> element permits table or informaltable children. Bob Stayton Sagehill Enterprises b...@sagehill.net ----- Original Message ----- From: "maxwell" <maxw...@umiacs.umd.edu> To: <docbook@lists.oasis-open.org> Sent: Friday, February 26, 2010 7:28 AM Subject: [docbook] informaltable inside table We're using DocBook 5 to write grammars, and one of the constructs we use a lot is tables. These are mostly used to display paradigms, and frequently a cell in a paradigm needs to display several kinds of information. An example cell might look like this: ko'tan k-o'tan my-heart (Actually, the grammar we're using now has an Arabic script form on the left and its romanized form on the right, but I don't trust email to transmit that correctly.) Some cells are more complex, but the general point is that because we want things to line up vertically (and other alignment issues), the obvious solution is to use some kind of a table inside these table cells. The most obvious solution would be to make the cells be <entrytbl>s instead of <entry>s. That didn't work, because in some cases we need to have paradigm cells span columns and/or rows. (This happens when a single form in a language has more than one use in the language. An example would be standard Spanish, where a present tense verb ending in -an or -en is used for both second and third person plural.) While <entrytbl>s can span columns, the DocBook standard (and the CALS standard on which it is based) doesn't allow them to span rows. So the next solution would be to put a <table> or an <informaltable> inside an <entry>, thus: <table> ... <entry> <table>...</table> </entry> </table> This is perfectly possible, but it forces us to put a <title> in the inner <table>, which we don't want. We do want <title>s on the outer table, so I thought this would work: <table> ... <entry> <informaltable>...</informaltable> </entry> </table> Unfortunately, DocBook forbids this: "informaltable must not occur in the descendants of table." That comes from http://www.docbook.org/tdg5/en/html/cals.table.html; there is also a schematron rule enforcing this at http://www.docbook.org/xml/5.0/sch/docbook.sch: <s:rule context="db:table"> ... <s:assert test="not(.//db:informaltable)"> informaltable must not occur in the descendants of table </s:assert> ... </s:rule> What is the reason for preventing <informaltable>s from appearing as a descendant of <table>? This limitation doesn't appear to come from the CALS standard, which does not (AFAICT) define <informaltable>. It seems to make good sense (to me!) to allow tables without titles inside of tables with titles; in fact, I can't think of a situation where I would want a <table> with a <title> to be embedded inside another <table>. In sum, as long as a <table> can be embedded inside an <entry>, I think it should be possible to embed an <informaltable> there too. I'm posting here first in case there's some good reason that I can't think of for not allowing this; I'll submit an RFE later, if I don't get push back. Mike Maxwell --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-h...@lists.oasis-open.org