[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

fo:table-cell aligment

Subject: fo:table-cell aligment
From: Luke <ljones@xxxxxxxxxx>
Date: Tue, 22 May 2007 11:40:30 -0500
 fo:table-cell aligment
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.