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 Elliotte Harold <el...@metalab.unc.edu> on 2006/04/18 23:25:45 UTC

Preserving white space

I noticed that with the 0.90 FOP I'm losing the white space indentation 
in elements like this one:

<fo:block space-before.minimum="0.5em" space-before.optimum="1em" 
space-before.maximum="2em" space-after.minimum="0.5em" 
space-after.optimum="1em" space-after.maximum="2em" 
id="d4e1638"><fo:block space-before.minimum="0.8em" 
space-before.optimum="1em" space-before.maximum="1.2em" 
space-after.minimum="0.8em" space-after.optimum="1em" 
space-after.maximum="1.2em" hyphenate="false" font-family="monospace" 
text-align="start" wrap-option="no-wrap" id="d4e1639" 
white-space-collapse="false" white-space-treatment="preserve" 
linefeed-treatment="preserve">class AddInts {

   public static void main (String args[]) {

     int i = 1;
     int j = 2;

     System.out.println("i is " + i);
     System.out.println("j is " + j);

     int k = i + j;
     System.out.println("i + j is " + k);

     k = i - j;
     System.out.println("i - j is " + k);

   }

}
</fo:block></fo:block>

This seems to be a known issue with white-space-treatment="preserve". I 
could swear this used to work a few years ago. Anything I can do about it?

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

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


Re: Preserving white space

Posted by Manuel Mall <mm...@arcus.com.au>.
On Wednesday 19 April 2006 05:25, Elliotte Harold wrote:
<snip/>
> This seems to be a known issue with white-space-treatment="preserve".
> I could swear this used to work a few years ago. Anything I can do
> about it?

This is fixed in the trunk version of FOP. Download and build it or wait 
a few days as a 0.92 release is imminent.

Manuel

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


Re: Preserving white space

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Elliotte Harold wrote:
> I noticed that with the 0.90 FOP I'm losing the white space indentation 
> in elements like this one:
...
> This seems to be a known issue with white-space-treatment="preserve".

Indeed, it is.

> I 
> could swear this used to work a few years ago. Anything I can do about it?
> 

Yes, this used to work with 0.20.5. The layout engine has been
completely rewritten, including whitespace handling. There have
been some fixes in this area since 0.91 was released, which are
available from SVN and which will already be included in the upcoming
0.92 beta release. We'll be glad if you would test your file with this
more recent code.

J.Pietschmann

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