You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Vi...@ubsw.com on 2001/08/07 13:40:05 UTC

Nesting tables in FOP

I am using FOP 0-19-0.CVS and having problems nesting tables.  Just as 
a simple test I am trying to place one table inside a block, within a 
single outer table cell.  The PDF output does display the values, but 
entirely ignores the inner table structure by placing the values on a 
single row.

I have seen some of the other discussions on this issue, eg, setting 
column widths, yet have not been able to resolve the problem.  Attached 
is the xsl fragment.

Does anyone know how to overcome this, or have an example of code that 
will give me something to work from?

Many thanks
Vicki

Re: Nesting tables in FOP

Posted by Karen Lease <kl...@club-internet.fr>.
Hi Vicki,

I believe there is a small problem in your XSL stylesheet. You've
written:

<xsl:template match="Confirmation/TradeHeaderSection/table/row/cell1">
	<fo:table-cell>
	<fo:block>
		<xsl:value-of select="./tableA"/> <!-- SEE BELOW! -->
	</fo:block>
	</fo:table-cell>
</xsl:template>

I think you mean '<xsl:apply-templates select="./tableA"/>'. That will
cause the content of tableA to be processed to create the nested table.

By the way, you probably could simplify your stylesheet quite a bit. If
you just say <xsl:apply-templates/>, it will process all the children of
the current node in order. Also in your <xsl:template> elements, you
only need to match on the entire context of an element if you need to do
something different depending on where the element appears. For example,
you might be able to use: 
	<xsl:template match="cell1">
in the rule above, since your structure seems quite unambiguous.

Hope that helps you on your way,
-Karen Lease


Victoria.Beeby@ubsw.com wrote:
> 
> I am using FOP 0-19-0.CVS and having problems nesting tables.  Just as
> a simple test I am trying to place one table inside a block, within a
> single outer table cell.  The PDF output does display the values, but
> entirely ignores the inner table structure by placing the values on a
> single row.
> 
> I have seen some of the other discussions on this issue, eg, setting
> column widths, yet have not been able to resolve the problem.  Attached
> is the xsl fragment.
> 
> Does anyone know how to overcome this, or have an example of code that
> will give me something to work from?
> 
> Many thanks
> Vicki
> 
>   ------------------------------------------------------------------------
>                     Name: Test_fo_5.xsl
>    Test_fo_5.xsl    Type: unspecified type (application/octet-stream)
>                 Encoding: base64
> 
>   ------------------------------------------------------------------------
> 
> Visit our website at http://www.ubswarburg.com
> 
> This message contains confidential information and is intended only
> for the individual named.  If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail.  Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free
> as information could be intercepted, corrupted, lost, destroyed,
> arrive late or incomplete, or contain viruses.  The sender therefore
> does not accept liability for any errors or omissions in the contents
> of this message which arise as a result of e-mail transmission.  If
> verification is required please request a hard-copy version.  This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities or
> related financial instruments.
> 
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org