I have a table coded in XSL which is used to generate a pdf when executed. There is an issue when a user enters data into the CountryGroup table cell. If there are no spaces in the data it will break the boundaries of the cell and the data will spill into other cells making the document unreadable.
I am trying to figure out a way to make the text wrap. Please see the code snippet below:
<fo:table-cell border="1pt solid black" display-align="after"><fo:block>Customer Seq Range</fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" display-align="after"><fo:block>Label Code</fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" display-align="after"><fo:block>Labelled Lot</fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" display-align="after"><fo:block>Country Group</fo:block></fo:table-cell> <!--NCCRC200003 Country Group -->
<fo:table-cell border="1pt solid black" display-align="after"><fo:block>Lot Expiry</fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" display-align="after"><fo:block>QTY</fo:block></fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row font-size="9pt" font-weight="normal">
<fo:table-cell border="1pt solid black" padding="3mm 0mm" display-align="center"><fo:block><xsl:value-of select="ItemNumber"/></fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" padding="3mm 0mm" display-align="center"><fo:block><xsl:value-of select="RangeStart"/>-<xsl:value-of select="RangeEnd"/></fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" padding="3mm 0mm" display-align="center"><fo:block><xsl:value-of select="CustRangeStart"/>-<xsl:value-of select="CustRangeEnd"/></fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" padding="3mm 0mm" display-align="center"><fo:block><xsl:value-of select="LabelType"/></fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" padding="3mm 0mm" display-align="center"><fo:block><xsl:value-of select="OtherLot"/></fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" padding="3mm 0mm" display-align="center"><fo:block><xsl:value-of select="CountryGroup"/></fo:block></fo:table-cell> <!--NCCRC200003 Country Group. -->
<fo:table-cell border="1pt solid black" padding="3mm 0mm" display-align="center"><fo:block><xsl:value-of select="ExpiryDate"/></fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black" padding="3mm 0mm" display-align="center"><fo:block><xsl:value-of select="Quantity"/></fo:block></fo:table-cell>
</fo:table-row>