InDesign Table group on sum of colspan
Dear,
Please help me to solve create grouping on table cell, based on sum of colspan equal to tgroup colum.
Here is the source table xml:
<?xml version="1.0" encoding="UTF-8"?>
<Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid5:tablestyle="TB_Table" aid:table="table" aid:trows="4" aid:tcols="4">
<Cell rowspan="1" colspan="1" aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><col.hd.l>Variable</col.hd.l></Cell>
<Cell rowspan="1" colspan="3" aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="3"><col.hd.l>Do You, Personally, Identify as Lesbian, Gay, Bisexual, or Transgender?</col.hd.l></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><cell.txt.l></cell.txt.l></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><col.hd.c>Yes (%)</col.hd.c></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><col.hd.c>No (%)</col.hd.c></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><col.hd.c>Don't Know/Refused to Answer (%)</col.hd.c></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><cell.txt.l>Race/ethnicity</cell.txt.l></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><cell.txt.c></cell.txt.c></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><cell.txt.c></cell.txt.c></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><cell.txt.c></cell.txt.c></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><cell.txt.li>Non-Hispanic White</cell.txt.li></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><cell.txt.c>3.2</cell.txt.c></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><cell.txt.c>93.0</cell.txt.c></Cell>
<Cell rowspan="1" colspan="1" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="75"><cell.txt.c>2.8</cell.txt.c></Cell></Table>
and I require the output:
<?xml version="1.0" encoding="UTF-8"?>
<table>
<tr valign="top">
<td rowspan="1" colspan="1"> <col.hd.l>Variable</col.hd.l> </td>
<td rowspan="1" colspan="3"> <col.hd.l>Do You, Personally, Identify as Lesbian, Gay, Bisexual, or Transgender?</col.hd.l> </td>
</tr>
<tr valign="top">
<td rowspan="1" colspan="1"> <cell.txt.l/> </td>
<td rowspan="1" colspan="1"> <col.hd.c>Yes (%)</col.hd.c> </td>
<td rowspan="1" colspan="1"> <col.hd.c>No (%)</col.hd.c> </td>
<td rowspan="1" colspan="1"> <col.hd.c>Don't Know/Refused to Answer (%)</col.hd.c> </td>
</tr>
<tr valign="top">
<td rowspan="1" colspan="1"> <cell.txt.l>Race/ethnicity</cell.txt.l> </td>
<td rowspan="1" colspan="1"> <cell.txt.c/> </td>
<td rowspan="1" colspan="1"> <cell.txt.c/> </td>
<td rowspan="1" colspan="1"> <cell.txt.c/> </td>
</tr>
<tr valign="top">
<td rowspan="1" colspan="1"> <cell.txt.li>Non-Hispanic White</cell.txt.li> </td>
<td rowspan="1" colspan="1"> <cell.txt.c>3.2</cell.txt.c> </td>
<td rowspan="1" colspan="1"> <cell.txt.c>93.0</cell.txt.c> </td>
<td rowspan="1" colspan="1"> <cell.txt.c>2.8</cell.txt.c> </td>
</tr>
</table>
Please help
|