OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]