[xsl] fo:table-cell aligment

Subject: [xsl] fo:table-cell aligment
From: Luke <ljones@xxxxxxxxxx>
Date: Tue, 22 May 2007 11:40:30 -0500
XSL Experts,

I'm having some issues with a simple fo:table.  It seems that if I have
a table-cell where a word wraps, it throws my table alignment off.  I've
search and googled, and have tried many different things but to no
avail.

How I have the table set up:

<fo:page-sequence>
	<fo:flow>
		<xsl:for-eache select = "//sect">
		<fo:block font-faimly = "Times New Roman">
			<fo:table table-layout = "fixed" width = "100%">
			<fo:table-column column-width = "2.5cm"/>
			<fo:table-column column-width = "4.2in"/>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell>
						<fo:block>
							<xsl:apply-templates select = "sections/ch">
						</fo:block>
					</fo:table-cell>
					<fo:table-cell>
						<fo:block>
							<xsl:apply-templates select = "sections/sectCat">
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
			</fo:table>
		</fo:block>
		</xsl:for-each>
	</fo:flow>
</fo:page-sequence>

Then the templates look like:

<xsl:template match = "ch">
	<fo:block>
		<xsl:apply-templates/>
	</fo:block>
</xsl:template>
<xsl:template match = "sectCat">
	<fo:block>
		<xsl:apply-templates/>
	<fo:block>
</xsl:template>

The xsl for it is very basic:

<sect>
	<ch>1.</ch>
	<sectCat>Blah blah blah blah blah</sectCat>
	<ch>2.</ch>
	<sectCat>xsl-list rocks!</sectCat>
</sect>


With the above code, I'm assuming my output should be:

1. Blah blah blah
   blah blah
2. xsl-list rocks!

Instead I'm getting:

1. Blah blah blah
2. blah balh
   xsl-list rocks!

Any ideas on this would be greatly appreciated.  It seems like it should
be such a simple fix!

-Luke

Current Thread