I need to create a 2 column table, filled by a not-fixed number images, one image per cell, two cell per row. We are using XSL-FO
I have this XSL data as input for XSL
<viewList>
<views order="1">data:image/jpg;base64,/9j/4AAQSkZJRg...(base64 data)</views>
<views order="2">data:image/jpg;base64,/9j/4AAQSkZ432...(base64 data)</views>
<views order="3">data:image/jpg;base64,/9j/4AAQSkZdgd...(base64 data)</views>
<views order="4">data:image/jpg;base64,/9j/4AAQSkZ775...(base64 data)</views>
<views order="5">data:image/jpg;base64,/9j/4AAQSk7655...(base64 data)</views>
</viewList>
As you can notice content of tag views are base64 info, coding images.I have just truncate them; they are quite long.
For rendering images I use tag fo:external-graphic. So, I manage to paint all images in a single table:
<fo:table>
<fo:table-body>
<xsl:for-each select="viewList/views">
<fo:table-row>
<fo:table-cell>
<fo:block text-align="center">
<fo:external-graphic src="{current()}"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
As you see; this is not enterely valid; bacause its an image per cell... any idea on how to put them in 2 columns?