On Fri, 9 Jun 2006, Francois Lachance wrote:
> David's thoughts about encoding columns in tables got me to thinking about using milestones for such
> complex layouts for examples where a column could contain a table with its own set of columns.
> <row></cb n="1a"><cell>cat</cell></cb n="2"<cell>hair</cell></row>
> <row></cb n="1a"><cell>mouse</cell>/cb n="1a">moose<cell></cell></cb n="2"><cell>fur</cell></row>
> <row></cb n="1a"><cell>house</cell>/cb n="1a">hose<cell></cell></cb n="2"><cell>scale</cell></row>
> Would this be simplier than linking spans of cells back to a <colDef> element?
> Such an approach to column breaks makes me ponder page breaks and how they are and are not like column
I don't think the <cb> element is meant to indicate column breaks within
tables. But in any case, it would be possible, and simpler, to achieve
the same thing simply by using the "n" attribute on <cell> to provide
the layout column in which the cell appears. So, for example, you could
encode a table like this:
| | rat |
| cat |-----*
| | bat |
<table cols="3" rows="3">
<cell cols="2" rows="2" n="1">cat</cell>
In theory this is unnecessary, because one can determine the physical
layout column of any cell programmatically. But in practice it can be a
difficult programming task (you really want to construct an array
variable depicting the table and work off that, and at least in XSLT 1.0
this is a real pain to emulate). So hand labelling is helpful.
(Assuming you're always accurate with the labels, that is! Not a simple
thing with complex tables.)
If you want a way to associate particular roles or rendering with a
column, you still need a tagging element to do that, which is where
something like <colDef> would come in.
I've decided for my purposes that implementing a full-blown <colDef>
extension element is too difficult (mostly because of the programming
issues alluded to above; I need something that will work with
Mozilla/Firefox's XSLT 1.0 processor). As a compromise I've modified my
<table> definition to allow <html:colgroup>/<html:col> which adds the
limited functionality of HTML's column handling.
David Sewell, Editorial and Technical Manager
Electronic Imprint, The University of Virginia Press
PO Box 400318, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: [log in to unmask] Tel: +1 434 924 9973