xsl-list
[Top] [All Lists]

Re: [xsl] Chunking large CALS table in mulitple smaller tables

2008-06-26 01:44:22


something like  this (untested)


<xsl:template match="table">
<xsl:for-each select="tgroup/colspec[position()!=1][position() mod 9 = 1]">
<xsl:variable name="start" select="(position()-1)*9+2"/>
<table id="t{position()}">
<tgroup>
<colspec colname="col1" colwidth="*"/>
<xsl:for-each select="(.|following-sibling::colspec)[position() &lt;10]">
<colspec colname="col{position()+1}" colwidth="*"/>
<tbody>
<xsl:for-each select="row">
<row>
<xsl:copy-of select="@*"/>
<xsl:for-each select="entry[position()=1 or 
(position()&gt;=$start)][position()&lt;=10]">
<entry colname="col{position()}">
<xsl:apply-templates/>
</entry>
</xsl:for-each>
</row>
</xsl:for-each>
</tbody>
</xsl:for-each>
</tgroup>
</table>
</xsl:for-each>
</xsl:template>

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

--~------------------------------------------------------------------
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>
--~--