I try not to let it do anything by default so I don't have to worry
about anything changing in a future version.
I write programs which create my xml input, I'm not trying to read in
text like a book, so I don't have any linefeeds.  All text blocks fit on
one line.
I don't worry about where text ends up on the page because I've already
calculated that.  All my blocks use absolute positioning.
Sometimes blocks have automatic stuff like padding, like this line
spacing you describe.  I get around it with code like this.
     <fo:block-container>
          <xsl:attribute name="text-align">start</xsl:attribute>
          <xsl:attribute name="padding-top">0px</xsl:attribute>
          <xsl:attribute name="padding-bottom">0px</xsl:attribute>
          <xsl:attribute name="padding-right">0px</xsl:attribute>
          <xsl:attribute
name="linefeed-treatment">preserve</xsl:attribute>
For a block with no text in it, for other purposes, you can throw in one
of these.
          <fo:block>
               <xsl:attribute name="line-height">0</xsl:attribute>

A lot of people put xsl tags in line as you've done there with
white-space-treatment, but I think it's easier to read if you split them
out to their own tags.

-----Original Message-----
From: bugzi...@apache.org [mailto:bugzi...@apache.org] 
Sent: Friday, January 07, 2011 12:18 PM
To: fop-dev@xmlgraphics.apache.org
Subject: DO NOT REPLY [Bug 49186] Empty fo:inline objects with id
attribute generate blank line

https://issues.apache.org/bugzilla/show_bug.cgi?id=49186

--- Comment #2 from Andreas L. Delmelle <adelme...@apache.org>
2011-01-07 12:18:10 EST ---

Not immediately dismissing this, but it did get me wondering which
situation is wrong.
FOP does not generate an area for empty inlines if they have no id or
markers that should be tracked, which is why there is a difference
between the two cases.
Now, if we have:

<fo:block white-space-treatment="preserve">
  <fo:block>There should be a blank line between this block</fo:block>
  <fo:block>and this block</fo:block>
</fo:block>

The output is rendered, as expected, with a line in between both blocks
containing only a single space character.

Same without white-space preservation, but only a zero-width space

<fo:block>
  <fo:block>There should be a blank line between this block</fo:block>
  &#x200B;
  <fo:block>and this block</fo:block>
</fo:block>

Checking http://www.w3.org/TR/xsl/#area-inline, it seems like even empty
inlines are in fact supposed to generate an area (= content/allocation
rectangle), regardless of whether an id or marker is present (?). If
that is so, then /that/ would be the case that needs fixing, contrary to
what the bug description indicates.

The only way to really avoid that spurious blank space, would be to set
the font-size of the empty inline to 0pt.

--
Configure bugmail:
https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: ------- You are the
assignee for the bug.

Reply via email to