Re: [xsl] How to make auto row-spanned table

Subject: Re: [xsl] How to make auto row-spanned table
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Apr 2013 12:40:58 -0400
At 2013-04-25 01:29 +0900, Toshihiko Makita wrote:
Hi list,

I'm making a stylesheet that converts DITA
documents to XSL-FO. Usually a table is authored
with entry/@morerows attribute. But some table
has no @morerows attribute. My challenge is to
generate row-spanned table from this table automatically by stylesheet.

For your reference I uploaded sample PDF to Yahoo! Box.

http://yahoo.jp/box/B71Fo9

(To download the PDF, click "cc&c3c-c<c " button.)

It would help us help you to have the XML input data of your table example. You can post it as clear text in your message and we can cut it out and create a file from it.

The first table is input table. It has no
@morerows attribute. The second result table is
desired output. The first column and second
column and third column has row spans.

Can someone give me an advice about how to implement this?

A brute force approach would be by counting the number of rows that follow until the cell value changes. I suspect this can be done with a straightforward XPath 2.0 expression, but I'm not about to take the time to recreate the input data to test it.

Alternatively, one might be able to use nested
grouping for a more elegant approach.  Actually,
thinking about this, this might even be preferred.

. . . . . . . . Ken


-- Contact us for world-wide XML consulting and instructor-led training | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: https://plus.google.com/116832879756988317389/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |

Current Thread