Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1536

Questionable white-space-treatment behavior


    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: unqualified
    • Labels:
    • Environment:
      Operating System: Windows Vista
      Platform: PC
    • External issue ID:


      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)?


        1. whitespace_without_wrapping_block.fo
          4 kB
          Sean Griffin
        2. whitespace_without_wrapping_block.pdf
          7 kB
          Sean Griffin
        3. whitespace_wrapping_block.fo
          4 kB
          Sean Griffin
        4. whitespace_wrapping_block.pdf
          7 kB
          Sean Griffin
        5. test.at.pdf
          7 kB
          Andreas L. Delmelle



            • Assignee:
              trenchguinea Sean Griffin
            • Votes:
              1 Vote for this issue
              2 Start watching this issue


              • Created: