xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <dev.jerem...@greenmail.ch>
Subject Handling of block-level FOs inside fo:inline and related
Date Wed, 03 Aug 2005 18:30:56 GMT
fo:inline, fo:bidi-override and fo:inline-container are all inline-level
FOs and all allow block-level content. Currently, they are not
implemented. See, for example, inline1.xml which fails with a
ClassCastException. The FO I skipped here is fo:wrapper which in the
current implementation doesn't really wrap its content and therefore
avoids an important problem:

Inline FOs return element lists processed by the line breaker. They
don't have a way to return elements for the page breaker.

I've been asked to do a time estimate for implementing fo:inline.
fo:inline is particularly important since a lot of people use empty
fo:blocks, for example, to mimic newlines. Now I wonder about how to
implement fo:inline. The only way I came up with was to try normalizing
the FO tree and to let fo:inline be what it currently is:


<fo:block color="blue">blah blah <fo:inline font-style="italic">blah<fo:block/>blah</fo:inline>blah</fo:block>


<fo:block color="blue">blah blah <fo:inline font-style="italic">blah</fo:block>
<fo:block color="blue" font-style="italic"/>
<fo:block color="blue" ><fo:inline font-style="italic">blah</fo:inline>blah</fo:block>


<fo:block color="blue">
  <fo:block>blah blah <fo:inline font-style="italic">blah</fo:block>
  <fo:block font-style="italic"/>
  <fo:block><fo:inline font-style="italic">blah</fo:inline>blah</fo:block>

Replicating the properties of an fo:inline to a copy shouldn't be much
of a problem. Replicating the properties for the contained block might
already me a little more difficult because of the whole inheritance

Is there another way? A better way? Any ideas?

For fo:bidi-override, the same approach would be used.

For fo:inline-container this whole thing is easier since it generates a
viewport/reference pair, so it will ultimately need its own breaker
(like absolutely positioned block-containers).

Jeremias Maerki

View raw message