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 Michael König <Mi...@ms-koenig.de> on 2002/10/26 19:52:01 UTC

line break where no break should be

Hello,

I have a problem with line wrapping in tables:

I have a table with the first column having long text like:

a long description of this invoice item (10 hours a 10$)
a shorted description (50 words a 0.10$)

Now, if the whole text is too long for being written in one line
I would like to have the whole texte in the brackets in the second line

like

|------------------------------ line ------|
a long description of this invoice item <break>
(10 hours a 10$)

and not

a long description of this invoice item (10 <break>
hours a 10$)

I tried the following:
my xml-code looks like:

<beschreibung>
  a long description of this invoice item
    <detail>(10 hours a 10$)</detail>
</beschreibung>

(what I would like to have is "no line break" within the text of the
"detail"-node)

and the fo-xsl

-- the table (first column) --
[...]
<fo:table-cell>
  <xsl:apply-templates select="beschreibung"/>
</fo:table-cell>
[...]

<xsl:template match="beschreibung">
  <fo:block keep-together.within-page="always">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="detail">
  <fo:inline keep-together.within-line="always">
    <xsl:value-of select="."/>
  </fo:inline>
</xsl:template>


Any ideas,

Thanks in advance,
Michael



Re: line break where no break should be

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Michael König wrote:
>   <fo:inline keep-together.within-line="always">

keep-together.within-line is not implemented. I suggest to open
a new block.

BTW
 > <beschreibung>
 >   a long description of this invoice item
 >     <detail>(10 hours a 10$)</detail>
 > </beschreibung>
This kind of mixed content XML is very bad design.

J.Pietschmann