Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2014, 09:37 AM
Registered User
 
Join Date: Oct 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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&apos;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





Similar Threads
Thread Thread Starter Forum Replies Last Post
very urgent:cals table to indesign table using xsl franklinclinton XSLT 1 December 16th, 2009 03:48 PM
Algorithmic problem transformin table with colspan fmilano XSLT 1 June 18th, 2007 02:29 PM
SUM and GROUP BY in vba wdepreter Excel VBA 3 February 5th, 2007 06:11 AM
Group by , Sub Group by and Sum mateenmohd SQL Server 2000 1 March 29th, 2005 09:51 AM
GROUP BY Avg and Sum pinkandthebrain SQL Server 2000 3 July 14th, 2003 09:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.