Bug 52526 - Empty fo:wrapper generates an area when nested in a fo:block
Empty fo:wrapper generates an area when nested in a fo:block
Status: NEW
Product: Fop - Now in Jira
Classification: Unclassified
Component: general
1.0
All All
: P5 normal
: ---
Assigned To: fop-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-01-25 18:03 UTC by Jeffrey Walton
Modified: 2012-04-21 04:57 UTC (History)
0 users



Attachments
PDF document showing erratic use of vertical whitespace (9.17 KB, application/pdf)
2012-01-25 18:03 UTC, Jeffrey Walton
Details
Additional information (9.66 KB, application/zip)
2012-01-25 18:46 UTC, Jeffrey Walton
Details
Short XSL-FO with empty wrapper generating area (709 bytes, text/xml)
2012-01-26 12:53 UTC, Pascal Sancho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Walton 2012-01-25 18:03:38 UTC
Created attachment 28208 [details]
PDF document showing erratic use of vertical whitespace

<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<book>
  <chapter id="ch_test">
    <title>Chapter Test</title>

    <para>This is a test whitespace due to &lt;indexterm&gt;,</para>

    <para>0 &lt;indexterm&gt; above this paragraph.</para>

    <para>0 &lt;indexterm&gt; above this paragraph.</para>

    <section id="sctn_1">
      <title>Section 1</title>

      <indexterm>
        <primary>Term 1-1</primary>
      </indexterm>

      <para>1 &lt;indexterm&gt; above this paragraph.</para>

      <para>0 &lt;indexterm&gt; above this paragraph.</para>

      <indexterm>
        <primary>Term 1-1</primary>
      </indexterm>

      <para>1 &lt;indexterm&gt; above this paragraph.</para>

    </section>

    <section id="sctn_2">
      <title>Section 2</title>

      <indexterm>
        <primary>Term 2</primary>

        <secondary>Term 2-1</secondary>
      </indexterm>

      <indexterm>
        <primary>Term 2</primary>

        <secondary>Term 2-2</secondary>
      </indexterm>

      <para>2 &lt;indexterm&gt; above this paragraph.</para>

      <indexterm>
        <primary>Term 1-1</primary>
      </indexterm>

      <para>1 &lt;indexterm&gt; above this paragraph.</para>

      <para>0 &lt;indexterm&gt; above this paragraph.</para>

      <indexterm>
        <primary>Term 2</primary>

        <secondary>Term 2-1</secondary>
      </indexterm>

      <indexterm>
        <primary>Term 2</primary>

        <secondary>Term 2-2</secondary>
      </indexterm>

      <para>2 &lt;indexterm&gt; above this paragraph.</para>

    </section>

    <section id="sctn_3">
      <title>Section 3</title>

      <indexterm>
        <primary>Term 3</primary>

        <secondary>Term 3-1</secondary>
      </indexterm>

      <indexterm>
        <primary>Term 3</primary>

        <secondary>Term 3-2</secondary>
      </indexterm>

      <indexterm>
        <primary>Term 3</primary>

        <secondary>Term 3-3</secondary>
      </indexterm>

      <para>3 &lt;indexterm&gt; above this paragraph.</para>

      <indexterm>
        <primary>Term 1-1</primary>
      </indexterm>

      <para>1 &lt;indexterm&gt; above this paragraph.</para>

      <para>0 &lt;indexterm&gt; above this paragraph.</para>

      <indexterm>
        <primary>Term 3</primary>

        <secondary>Term 3-1</secondary>
      </indexterm>

      <indexterm>
        <primary>Term 3</primary>

        <secondary>Term 3-2</secondary>
      </indexterm>

      <indexterm>
        <primary>Term 3</primary>

        <secondary>Term 3-3</secondary>
      </indexterm>

      <para>3 &lt;indexterm&gt; above this paragraph.</para>

    </section>
  </chapter>
</book>
Comment 1 Jeffrey Walton 2012-01-25 18:04:49 UTC
$ uname -a
Linux studio 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:12:07 UTC 2012 x86_64 GNU/Linux

$ fop -version
FOP Version 1.0
Comment 2 Glenn Adams 2012-01-25 18:27:04 UTC
Please rewrite this bug report in terms of XSL-FO content. FOP has no knowledge of the DocBook format you use to present your example.

That is, please supply a minimum XSL-FO document that depicts the problem you are reporting.
Comment 3 Jeffrey Walton 2012-01-25 18:46:08 UTC
Created attachment 28210 [details]
Additional information

FO object as requested.

With xsltproc and fop on path, `make-test.sh` should reproduce the problem.
Comment 4 Jeffrey Walton 2012-01-25 21:48:27 UTC
I'm not sure if this xsltproc, but just in case:

$ xsltproc -V
Using libxml 20706, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20706, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20706
libexslt 815 was compiled against libxml 20706

https://bugzilla.gnome.org/show_bug.cgi?id=668695
Comment 5 Pascal Sancho 2012-01-26 12:53:52 UTC
Created attachment 28213 [details]
Short XSL-FO with empty wrapper generating area

An empty fo:wrapper generates an area when it is descendant of an fo:block.
As a workaround, it can be successfully replaced with an fo:block or an fo:inline, regardless of space-* surrending properties.
Comment 6 Glenn Adams 2012-04-07 01:43:06 UTC
resetting P2 open bugs to P3 pending further review
Comment 8 Glenn Adams 2012-04-21 04:57:55 UTC
lower priority since a fix requires a significant design change in wrapper handling, about which see [1] for further info

[1] http://wiki.apache.org/xmlgraphics-fop/Design/XslFo/Wrapper