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 Rita Greenberg <rg...@medata.com> on 2011/08/18 19:32:51 UTC

Preserving White Spaces in FOP 1.0

Hello.

In FOP version 0.20.5 the following code preserved white spaces in text.
I'm in the process of converting to FOP version 1.0 and the same piece of code 
does not preserve the white spaces.

<fo:list-item-body start-indent="body-start()" end-indent="3mm">
  <xsl:for-each select="RCEXPLANATION/LINE">
    <fo:block white-space-collapse="false">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:for-each>
</fo:list-item-body>

Is there anything that I can do to preserve the white spaces?

Thank you,
Rita


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Preserving White Spaces in FOP 1.0

Posted by Rita Greenberg <rg...@medata.com>.
Chris Bowditch <bowditch_chris <at> hotmail.com> writes:

> 
> white-space-collapse will stop multiple spaces being merged into one. 
> You also need white-space-treatment="preserve" to stop whitespace at the 
> start and end of lines being suppressed.

Thanks so much Chris - that took care of my problem!


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Preserving White Spaces in FOP 1.0

Posted by Chris Bowditch <bo...@hotmail.com>.
On 18/08/2011 18:32, Rita Greenberg wrote:
> Hello.

Hi Rita,

> In FOP version 0.20.5 the following code preserved white spaces in text.
> I'm in the process of converting to FOP version 1.0 and the same piece of code
> does not preserve the white spaces.
>
> <fo:list-item-body start-indent="body-start()" end-indent="3mm">
>    <xsl:for-each select="RCEXPLANATION/LINE">
>      <fo:block white-space-collapse="false">
>        <xsl:apply-templates/>
>      </fo:block>
>    </xsl:for-each>
> </fo:list-item-body>

white-space-collapse will stop multiple spaces being merged into one. 
You also need white-space-treatment="preserve" to stop whitespace at the 
start and end of lines being suppressed.

> Is there anything that I can do to preserve the white spaces?
>
> Thank you,
> Rita

Thanks,

Chris

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org