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

Chunking large CALS table in mulitple smaller tables

Subject: Chunking large CALS table in mulitple smaller tables
From: "Kevin Bird" <kevin.bird@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 25 Jun 2008 17:25:21 +0100
 Chunking large CALS table in mulitple smaller tables
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

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.