In a former post I shortly showed you how to dedicate height easily in XSL when using the document for printing for example a PDF document. I will use the same code here to show you how to accomplish vertical align. Also an easy thing when you know about it, but it required quite some Googling and trying before getting it right.
<fo:table table-layout="fixed">
<fo:table-column column-width="5cm"/>
<fo:table-body>
<fo:table-row height="0.5cm">
<fo:table-cell display-align="center">
<fo:block font-size="8pt"><xsl:value-of select="$somevalue"/></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="0.6cm">
<fo:table-cell display-align="center">
<fo:block font-size="8pt">Some hardcoded value</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="0.5cm">
<fo:table-cell display-align="before">
<fo:block font-size="8pt">Third textstring</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table
As you can see I have added an attribute to the fo:table-cell tag called display-align. In this example it can have three values which corresponds to the following in HTML.
display-align="before" - align="top" display-align="before" - align="middle" display-align="before" - align="bottom"

















