XML:
<?xml version="1.0" encoding="utf-8"?>
<NewDataSet>
<inc_incident>
<inc_traumatriagecriteria>
<TTC_ID>1 </TTC_ID>
<TraumaTriageCriteria>(M)echanism: Ejection</TraumaTriageCriteria>
</inc_traumatriagecriteria>
<inc_traumatriagecriteria>
<TTC_ID>2 </TTC_ID>
<TraumaTriageCriteria>(M)echanism: Fatality</TraumaTriageCriteria>
</inc_traumatriagecriteria>
<inc_traumatriagecriteria>
<TTC_ID>3 </TTC_ID>
<TraumaTriageCriteria>(P)hysiologic: GCS</TraumaTriageCriteria>
</inc_traumatriagecriteria>
<inc_traumatriagecriteria>
<TTC_ID>4 </TTC_ID>
<TraumaTriageCriteria>(A)natomic: Crushed</TraumaTriageCriteria>
</inc_traumatriagecriteria>
</inc_incident>
</NewDataSet>
XSL:
<fo:table-body>
<xsl:for-each select="inc_traumatriagecriteria">
<fo:table-row>
<fo:table-cell>
<fo:block>
<xsl:if test="contains(TraumaTriageCriteria, '(M)')">
<xsl:value-of select="text()"> </xsl:value-of>
</xsl:if>
</fo:block>
</fo:table-cell>
<fo:block>
<xsl:if test="contains(TraumaTriageCriteria, '(A)')">
</xsl:if>
</fo:block>
</fo:table-cell>
<fo:block>
<xsl:if test="contains(TraumaTriageCriteria, '(P)')">
</xsl:if>
</fo:block>
</fo:table-cell>
with xsl:if test="contains(TraumaTriageCriteria, '(A)')" I get result like this:
| MOI | AI | PC | =============================================================== |(M)echanism: Ejection | | | ------------------------------------------------------------------ |(M)echanism: Fatality | | | ----------------------------------------------------------------- | |(A)natomic: Crushed |(P)hysiologic: GCS | -------------------------------------------------------------------
but would like my table to look like this:
| MOI | AI | PC | ================================================= |(M)echanism: Ejection |(A)natomic: Crushed |(P)hysiologic: GCS| -------------------------------------------------
Any suggestion?
Well without looking, I see you XSL is wrong (see the comments in the following copy of your document):
You should output your FO to a nice, parsing conforming XML editor and look at all the mistakes and correct them.