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


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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

Subject: DOCBOOK-APPS: Help! Table formatting with XSL

Put on your XSL thinking caps, please :-)

Consider the following table:

|        |   B    |        |   D    |
+   A    +--------+   C    +--------+
|        |        |        |   E    |

Represented by this markup:

<tgroup cols="4">
<colspec colname="c4" colnum="4"/>
  <entry morerows="1">A</entry>
  <entry morerows="1">C</entry>
  <entry namest="c4">E</entry>

The correct HTML for this table is:

<table border="1">
  <td rowspan="2">A</td>
  <td rowspan="2">C</td>
  <td class="auto-generated"></td>

Can anyone see a practical way to achieve this result without
resorting to extension functions? The tricky bit is not simply
noticing that the introduction of namest may require some
auto-generated cells to be inserted, but calculating correctly, in the
presence of overhang (from an arbitrarily large number of preceeding
rows), how many cells to insert.

(This problem is slightly less serious in the FO case because
fo:table-cell elements have a column-number attribute; although there
are still some potential cell-border problems, I think.)

The DSSSL stylesheets handle this by keeping a list of the overhang on
each column. Since XSL doesn't have lists of integers, that's going to
be considerably more complicated (though I suspect it can be done with
a string of space delimited integers).

I'm hoping I've overlooked something clever and elegant.

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com>      | It is not impossibilities which
http://www.oasis-open.org/docbook/ | fill us with the deepest despair,
Chair, DocBook Technical Committee | but possibilities which we have
                                   | failed to realize.--Robert Mallet

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

Powered by eList eXpress LLC