On Nov 13, 2007, at 21:52, Kamal Bhatt wrote:

Hi Khamal

Hi,
I have a block with another block of text within and within it, I have another block of text. I do this to maintain spacing in certain circumstances (defined by the XSLT).

Unfortunately one of the sideffects of this is a very large space after the enclosed block. If I run the example below in FOP 0.93, I get some chunky spacing after "flight enquiries to check that your aircraft will be".

The effect you describe is to be expected, I think, if you look at this snippet (simply c&p; should be an exact copy of your original):

---
<fo:block linefeed-treatment="preserve" margin-bottom="5mm" margin- top="0"> <fo:block padding="0" margin-bottom="0" white-space-collapse="false" white-space- treatment="preserve"> flight enquiries to check that your aircraft will be </fo:block>

departing at the time shown on your ticket and itinerary.
---

The first series of 34 spaces in the outer block will be suppressed.

Note that you have both enabled white-space-preserve and disabled white-space-collapse on the inner block. This means that, if FOP decides to break the line after the trailing spaces, they will be considered relevant when aligning the text "flight enquiries...". Is that what you mean by 'chunky space'? Or is it maybe the effect of the preserved linefeeds in the outer block, that generate an empty line, because the second one is the only character in that line?

Getting preserved white-space correct can be very tricky. Perhaps you wanted this:

---
<fo:block linefeed-treatment="preserve" margin-bottom="5mm" margin- top="0"><fo:block padding="0" margin-bottom="0" white-space- treatment="preserve"> flight enquiries to check that your aircraft will be </fo:block>departing at the time shown on your ticket and itinerary.
---

Do you have control over the stylesheet? In that case, it should be a simple matter of adapting the template in question to produce the below version.


HTH!

Cheers

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to