[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Table formatting challenge

Subject: Table formatting challenge
From: Norman Walsh <ndw@xxxxxxxxxx>
Date: 12 Jul 2001 08:13:30 -0400
how to challeng debts
Consider the following table:

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

Represented by this markup:

<informaltable>
<tgroup cols="4">
<colspec colname="c4" colnum="4"/>
<tbody>
<row>
  <entry morerows="1">A</entry>
  <entry>B</entry>
  <entry morerows="1">C</entry>
  <entry>D</entry>
</row>
<row>
  <entry namest="c4">E</entry>
</row>
</tbody>
</tgroup>
</informaltable>

The correct HTML for this table is:

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

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.)

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

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@xxxxxxx   | Our years, our debts, and our enemies are
XML Standards Engineer | always more numerous than we imagine.--Charles
Technology Dev. Group  | Nodier
Sun Microsystems, Inc. | 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.