[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: request: flattening or normalising tables with spanned cells
From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Sep 2026 14:03:10 -0000
Hello Trevor,

Thanks to Martin I don't have to dig up old stuff, but I can confirm the
approach you are planning. Converting from OASIS tables to HTML one runs
into similar problems.

And I would definitely do this in two passes, yes - HTML first. Much easier
to debug and maintain.

This would be much easier using accumulators, wouldn't it?

Regards, Wendell


On Mon, Sep 28, 2026 at 9:47b/AM Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> (note: I'm looking for an XSL2 solution at this point.)
>
> I'm trying to convert certain XML documents to markdown [for reasons :-(
> ] and one of my issues is that the XML contains tables with arbitrary
> numbers of rows and columns (the column count is not supplied in an
> attribute), and some of these tables contain cells/td elements with
> rowspan or colspan (or both). Markdown tables of course do not support
> either row or column spanning.
>
> The approach I have chosen is to reprocess the tables so that spanned
> cells are replaced with repeated cells, either empty or replications of
> the original. I think I can see how to engineer this for colspans but
> rowspans are a whole other story.
>
> Has anybody done something similar and can give me some hints how to
> achieve this?
>
> And would it be better to refactor the tables in a separate pass before
> doing the markdown transformation or is it possible to achieve this
> using variables?
>
> TIA
>
> Trevor
>
>
>

--
...Wendell Piez... ...wendellpiez.com...
...pellucidliterature.org... ...raventracks.org...
... xproc.zone... ...github.com/wendellpiez...

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member