[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] InDesign IDML table conversion

Subject: Re: [xsl] InDesign IDML table conversion
From: Markus Abt <abt@xxxxxxxx>
Date: Mon, 20 Aug 2012 14:56:33 +0200

Hi Ganesh,

Ganesh Babu N wrote:
> Hi Markus,.
> What about Cigarettes, It should give 0 right? but it is also giving
> 2. Please suggest how to over come this hurdle.

>>>                                       <tr>
>>>                                               <td morerows="1" rowspan="2">Cigarettes</td>
>>>                                               <td>NA</td>
>>>                                               <td morerows="1" rowspan="2">test</td>
>>>                                               <td>7.6</td>
>>>                                       </tr>

"parent::tr/preceding-sibling::tr[1]/td[@morerows]" does _not_ select 
the Cigarettes <td> alone, but _also_ the test <td>, even when the 
"current" <td> belongs to the first or second column.
Therefore you get "2" in _both_ cases when counting 

Instead, you would need to count something like:

The ??? part would select the <td> in the correct column. Unfortunately, 
that ??? is all but easy, especially, when you are dealing with "complex" 
tables with lots of different rowspans (over more than 2 rows) and colspans.

You may want to try to find some solution elsewhere, DocBook XSL has 
been mentioned.

Good luck,

Current Thread