Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Problems with XSL-FO Table

From: "Ian Proudfoot" <ian.proudfoot@----------->
To:
Date: 12/2/2006 10:55:00 AM
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: [xsl] 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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent