Hi
Some of the tables I need to process are fairly large (200+ columns).
The publishing software I use will not render tables with this many
columns (unsurprisingly). I need to break these large tables into much
smaller ones, say 10 columns. Each table would repeat column 1 (row
titles).
INPUT: The real data will have multiple <row> elements.
----------
<table id="1">
<tgroup cols="239">
<colspec colname="col1" colnum="1"
colwidth="*"/>
...
<colspec colname="col239" colnum="3"
colwidth="*"/>
<tbody>
<row id="t1-1">
<entry colname="col1"
id="1">Statement</entry>
...
<entry colname="col239"
id="239"/>
</row>
...
</tbody>
</tgroup>
</table>
OUTPUT: The colspecs are sequential and I have added new attributes
(oldcolspec & olcolname) to show the original column number)
---------
<table id="1">
<tgroup cols="11">
<colspec colname="col1" colnum="1"
oldcolspec="1" colwidth="*"/>
...
<colspec colname="col10" colnum="10"
oldcolspec="10" colwidth="*"/>
<tbody>
<row id="t1-1">
<entry colname="col1"
oldcolname="1" id="1">Statement</entry>
...
<entry colname="col10"
oldcolname="10" id="10"/>
</row>
</tbody>
</tgroup>
</table>
<table id="2">
<tgroup cols="11">
<colspec colname="col1" colnum="1"
oldcolspec="11" colwidth="*"/>
...
<colspec colname="col10" colnum="10"
oldcolspec="20" colwidth="*"/>
<tbody>
<row id="t1-1">
<entry colname="col1"
oldcolname="11" id="1">Statement</entry>
...
<entry colname="col10"
oldcolname="20" id="10"/>
</row>
</tbody>
</tgroup>
</table>
...
<table id="23">
<tgroup cols="10">
<colspec colname="col1" colnum="1"
oldcolspec="231" colwidth="*"/>
...
<colspec colname="col10" colnum="10"
oldcolspec="239" colwidth="*"/>
<tbody>
<row id="t1-1">
<entry colname="col1"
oldcolname="231" id="1">Statement</entry>
...
<entry colname="col10"
oldcolname="239" id="10"/>
</row>
</tbody>
</tgroup>
</table>
Any help would be greatly appreciated.
Kind regards.
--
Kevin
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--