OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: FO processors and box stacking (Z-axis layering)


Hi,

I have noticed that different processors treat box stacking (the layering of objects along the "Z-axis") differently when using positioned blocks.

FOP does not accept the z-index property, which means that you must be careful how you place your blocks, as the order in which you write them will determine how they stack.  For example:

<fo:block-container absolute-position="fixed">
  <fo:block>UNDER</fo:block>
</fo:block-container>
<fo:block color="red">OVER</fo:block>

When processed with FOP, the text "UNDER" appears underneath the text "OVER".  However, when processed with XEP, the text "OVER" appears underneath the text "UNDER".  With XEP, you must use the z-index property to produce the desired output:

<fo:block-container absolute-position="fixed" z-index="-1">
  <fo:block>UNDER</fo:block>
</fo:block-container>
<fo:block color="red">OVER</fo:block>

You can see some more complex examples here: http://www.ecrion.com/Support/Resources/XSL-FOTutorial/AbsolutePositioning.xml.html .  If you were to process the examples there with XEP, you would not get the same output that is pictured unless you added z-index properties.

I am wondering why XEP does not layer boxes based on the order in which they are written, as FOP does (and presumably XF as well, given the examples posted on Ecrion's site).  Of course, with XEP, you can use z-index to fix this, but sometimes that is not ideal as you will then break FOP compatibility.

I guess this isn't so much a question as it is an observation.  But perhaps someone can give some insight, as I would like to write documents that are compatible with more than one FO processor.

Colin


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]