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

RE: Problems with XSL-FO Table

Subject: RE: Problems with XSL-FO Table
From: "Ian Proudfoot" <ian.proudfoot@xxxxxxxxxxx>
Date: Sat, 2 Dec 2006 10:54:03 -0000
ian proudfoot
Hi Philip,
I looks as if you need to add fo:table-column for each column in your table.
You will probably also want to define the column-number and column width for
each fo:table-column to give the desired results.

That should fix the problem.

Ian Proudfoot
iTP-X

-----Original Message-----
From: Philip Vallone [mailto:philip.vallone@xxxxxxxxxxx] 
Sent: 02 December 2006 04:13
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Problems with XSL-FO Table

Hi All,

I am trying to build a dynamic table in FO, but having little luck. I keep
receiving the following error:

[error]java.lang.ArrayIndexOutofBoundsException: -2


Here is my XML:

<table>
	<tbody>
		<tr>
			<td>Cell 1</td>
			<td>Cell 2</td>
			<td>Cell 3</td>
		</tr>
		<tr>
			<td>test 1</td>
			<td>test 2</td>
			<td>test 3</td>
		</tr>
		<tr>
			<td>cell 1</td>
			<td>cell 2</td>
			<td>cell 3</td>
		</tr>
	</tbody>
</table>


I am using the Apache FOP processor
Here is my XSLT:

<xsl:template match="table">
	<fo:block>
		<xsl:for-each select="tbody">
			<fo:table>
				<fo:table-body>
					<xsl:for-each select="tr">
						<fo:table-row>
							<xsl:for-each
select="td">
	
<fo:table-cell>
	
<fo:block>
	
<xsl:value-of select="."/>
	
</fo:block>
	
</fo:table-cell>
							</xsl:for-each>
						</fo:table-row>
					</xsl:for-each>
				</fo:table-body>
			</fo:table>
		</xsl:for-each>
	</fo:block>
</xsl:template>

Thanks,

Phil

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.