I noticed another problem with Marker.rebind(): When the same marker
is retrieved more than once, the first rebind is overwritten with the
second. See this example:

    <fo:static-content flow-name="xsl-region-after">
      <fo:block text-align="start">
        <fo:inline color="red">red: <fo:retrieve-marker 
retrieve-class-name="class" retrieve-boundary="page" 
retrieve-position="first-starting-within-page"/></fo:inline>,
        <fo:inline color="blue">blue: <fo:retrieve-marker 
retrieve-class-name="class" retrieve-boundary="page" 
retrieve-position="first-starting-within-page"/>.</fo:inline>
      </fo:block>
    </fo:static-content>

Both markers are printed in blue. Perhaps it would be a solution to
clone the subtree below the marker to retrieve-marker, and rebind that
copy. That would be another example of layout dependent data in the FO
tree. If every retrieve-marker would always discard its existing
subtree and copy the subtree under the retrieved marker in
LM.preloadnext(), this would prevent later runs with the same FO tree
from reusing markers that would pertain to the layout of an earlier
run.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.nl

Reply via email to