Search code examples
xmlxsltxsl-fo

XSLT - Block has to fit table-cell


My problem is based on a table with two cells. If there is more text in the one cell, its getting expanded in down direction. In that case the other block is shorter (note that the table cell is as big as the other).

Basically I want to make a border around the table cell. But it shall be an image as a border. I'm making a padding in the table cell and the background color of the inside blocks white. With that strategy it looks kinda like a border. The problem is, that the block in the second cell is smaller, so there is more space beneath it. The border gets inconsistent.

The output looks like this:

Is there a way to scale the block to fit?


Solution

  • Since you're using Antenna House, you can use <fo:block-container column-count="2"> and add break-before="column" on the second fo:block. See https://www.antennahouse.com/product/ahf64/ahf-ext.html#axf.column-count and https://www.w3.org/TR/xsl/#break-before