« Return to Thread: RE: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840

Generating an empty line (was: Re: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840)

by Andreas Delmelle-2 :: Rate this Message:

Reply to Author | View in Thread

On 26 Jun 2009, at 15:13, Ted Walker wrote:

Hi Ted

Ignore my earlier reply for the moment, as I just realized I was a bit  
too hasty there...

The most important question is: which FOP version are you using?
I sincerely hope you're not stuck on 0.20.x, since it is notoriously  
non-compliant in terms of respecting preserved linefeeds and white-
space...

> I've got an XSL FO that looks good to me, but the FOP processor  
> seems to
> be ignoring empty blocks and blocks with whitespace.
>
> The output I desire I am trying to achieve is:
> --------
> Line 1
>
> Line 2
> -------
>
> None of these following XSL FOs produce the desired result.  Am I
> missing something, or is this a limitation of FOP?

Option 1. will definitely not produce the intended effect, but both 2.  
and 3. definitely work in FOP 0.95.

As a small correction: the property "whitespace-treatment" does not  
exist. It should be specified as "white-space-treatment". FOP 0.95  
will exit with a ValidationException (unless you're using relaxed  
validation, which is not recommended)

If you are using 0.20.x and cannot upgrade, the effect of an empty  
line can normally be generated like so:

<fo:block
   space-after.optimum="1.2em"
   space-after.conditionality="retain"
   space-after.precedence="force" />



HTH!

Andreas

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

 « Return to Thread: RE: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840