Re: [xsl] Sorting out rowspans

Subject: Re: [xsl] Sorting out rowspans
From: "Spencer Tickner" <spencertickner@xxxxxxxxx>
Date: Mon, 11 Feb 2008 10:56:45 -0800
Thanks Andrew,

That looks like a really good start.

Cheers,

Spencer

On Feb 11, 2008 9:03 AM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
>
> On 11/02/2008, Spencer Tickner <spencertickner@xxxxxxxxx> wrote:
> > Hi List,
> >
> > Thanks in advance for any help. I'm having a hard time figuring a
> > little bit of XSLT,, Monday maybe. I'm reprocessing some XML from an
> > Indesign file and trying to figure out how to re-group rowspans.
> >
> > What I have.
> >
> > <tr>
> >   <td>col1</td>
> >   <td rowspan="2">col2</td>
> > </tr>
> > <tr>
> >   <td>col1</td>
> >   <td>col1</td>
> > </tr>
> > <tr>
> >   <td>col2</td>
> > </tr>
> >
> > Which should be processed to create:
> >
> > <tr>
> >   <td>col1</td>
> >   <td rowspan="2">col2</td>
> > </tr>
> > <tr>
> >   <td>col1</td>
> > </tr>
> > <tr>
> >   <td>col1</td>
> >   <td>col2</td>
> > </tr>
> >
> > Any thoughts on a nice way of doing this.. I'm using XSLT 2.0.
>
>
> I think you'll need a clearer definition of the problem, and even then
> it's reasonable task to sort that out.
>
> You could try normalizing the table:
>
> http://andrewjwelch.com/code/xslt/table/table-normalization.html
>
> ...then use the normalized table to determine which cells need to be
> moved, but it's definitely not a trivial task.
>
> cheers
> --
> Andrew Welch
> http://andrewjwelch.com
> Kernow: http://kernowforsaxon.sf.net/

Current Thread