Affects Version/s: trunk
Fix Version/s: None
Environment:Operating System: Windows Vista
External issue ID:45097
I've done quite a bit of digging in the web site and the mailing lists to track down this issue, and there does seem to be some issues around white-space handling. What I'm not clear on is whether the already-documented issues around white-space handling match the behavior I'm seeing, so I'll log this bug to explain.
Except for a few peculiar cases, the behavior documented in the specification regarding white-space-treatment does seem to be implemented correctly, but I'm wondering if the specification is either misinterpreted or wrong to begin with.
I'll attach some FO/PDF examples to explain better, but the bottom-line issue is that there does not appear to be a way to get spaces at the beginning of a line to preserve while not creating hanging indents for long blocks that have formatter-generated line feeds. The "ignore-if-surrounding-linefeed" property value obviously solves the hanging indent problem but also prevents spaces at the start of a block from preserving.
Curiously, if I add inline children to the block the treatment of the whitespace is different, and further, if I wrap the various blocks with a single parent block then it changes the whitespace treatment again. Please see attachments to see what I'm talking about.
I've tried this in both FOP 0.95beta and FOP Trunk with the same results.
To summarize, I see 3 questionable items:
1. Shouldn't the whitespace_without_wrapping_block.pdf match the whitespace_with_wrapping_block.pdf?
2. In whitespace_without_wrapping_block.pdf, is the behavior of Example 2 correct where whitespace is preserved inside inline elements even when whitespace-treatment != "preserve"?
3. In whitespace_without_wrapping_block.pdf, is there a way to get Example 1 behavior and Example 5 behavior with the same block property settings (to prevent Example 4 behavior)?