You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jacqueline Radebaugh <jr...@loc.gov> on 2006/08/21 20:06:34 UTC
Keeping text together in two different table cells
Hello:
I have created a table in XSL-FO where the output should look like:
$a Name of $a
$b Name of $b
My XSL-FO code is:
<fo:table table-layout="fixed" width="100%">
<fo:table-column column-width="40mm"/>
<fo:table-column column-width="10mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>
<xsl:text>$</xsl:text>
<xsl:value-of select="label"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block >
<xsl:value-of select="name"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
My XML code is:
<subfield>
<label>a</label>
<name>Formatted contents note</name>
</subfield>
Unfortunately, sometimes the <name> data exceeds the line of the column and flows on over to the next line. When this happens, my output columns resemble:
$a Name of $a that goes over the
line and ruins my columns.
$b Name of $b
I would like the output to ultimately look like (where the <name> data is aligned):
$a Name of $a that goes over the
line and ruins my columns.
$b Name of $b
but I do not know how to do this.
Is there a way to maintain the alignment of the table columns when the <name> data runs down to the next line?
Thank you very much for your help! I sincerely appreciate it.
Best wishes,
Jackie Radebaugh
Library of Congress
Network Development & MARC Standards Office
Washington, DC
USA
Phone: +1-202-707-1153
FAX: +1-202-707-0115
E-Mail: jrad@loc.gov
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Keeping text together in two different table cells
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Aug 21, 2006, at 20:06, Jacqueline Radebaugh wrote:
Hi,
> <snip />
> Unfortunately, sometimes the <name> data exceeds the line of the
> column and flows on over to the next line. When this happens, my
> output columns resemble:
>
> $a Name of $a that goes over the
> line and ruins my columns.
> $b Name of $b
Sorry. I seem to be unable to reproduce the problem. :/
What version are you using? Can you please post the FO (not source
XML and XSLT template)?
Feeding FOP Trunk the following as input
<fo:table-cell>
<fo:block>$a</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Name of $a that goes over the line and ruins my columns</
fo:block>
</fo:table-cell>
The second line of the second cell is neatly aligned with the rest.
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org