Ok, I'm pretty much ready now. But first: A big THANK YOU to Luca for
sharing with me/us his page breaking code he wrote last year and giving
me the permission to build on and publish it. That provided me with a
good head start. At first I was a bit overwhelmed by the amount of code.
But after extracting smaller methods from very big ones the whole thing
was easily be broken down and got easier to understand at the same time.
My first task was to merge Luca's new code with the code in CVS HEAD so
we don't loose (hopefully) any work done in the meantime (since around
Oct 2004).

The code is already surprisingly stable and reuses much of the code for
line breaking. Says something about the stability of the overall approach.
I've now locally resurrected a few basic things (Luca had already done
fo:block) and after that block-containers. I'm very confident now that
this approach will pay off. So again, thank you, Luca.

Here's the plan:

I'd like to tag CVS HEAD tomorrow and then branch it and commit my local
working copy to that branch. From there I'll continue to work on static
regions, lists and finally tables (actually resurrecting that
functionality). It turns out that after creating the basic Knuth
infrastructure in the LMs it's surprisingly easy to recreate/reuse the
functionality that grew over the last few months in CVS HEAD.

Luca's code contains several Italian comments and System.outs but I hope
you will overlook that for the moment. I'm replacing those with English
comments as I go. Furthermore, I left most of the old getNextBreakPoss()
code in there for reference. These parts will be purged prior to merging
the code back into CVS HEAD. I also expect that some refactoring will be
necessary in certain parts to beautify certain parts that suffered from
my tearing apart the code and trying to reuse as much as possible of the
page breaking code for laying out block-containers (and static regions).

Once everything is checked in, I invite everyone to have a look at the
new parts and help improve them. Luca already told me that he might have
some time to help next month which I look forward to. Luca will also
need to help a bit with his custom extensions of the spec for better
book-style layout. I've taken these parts over but haven't tested them,
yet, as they are not very high on my priorities.

An important issue I currently see is markers and page-number(-citation).
They will need some special attention with the new approach. I've left
them off so far.

I want the branch to be as short-lived as possible. The main reason for
the branch is that I don't want the code to block anyone working on
other parts in FOP (like Renaud on the renderers). Another is my
aversion against huge patches that need to be improved repeatedly. The
nice side-effect is that others can help me. As soon as we have most
functionality back that already exists in CVS HEAD and everyone is happy
with the new code/approach, I want to merge the branch back into CVS
HEAD and discard the branch. I expect that this will happen at the
beginning of Mai (at the current rate of progress I experienced so far).

Failure criteria:
- If the branch should fail to convince everyone until 2005-04-20 that
we're on the right track (technical showstoppers found), we delete the
branch and take a step back again. I pretty much convinced by now that
it won't happen but this needs to be adressed here.

Branch exit criteria:
- At least 80% of the functionality of the current CVS HEAD works again.
- Markers must work again.
- At least one of the showstoppers that we found for the old non-Knuth
approach must be proven to work with the new approach (for example,
table footers)
- None of the layoutengine testcases fail with an exception (they may
fail in the checks though)
- A path for implementing side-floats later should be visible.

I'm sure there are still a few challenging parts hidden in there, but I
think we stand a much better chance of handling them with the Knuth
approach than with the old one.

This is so much prose (sorry), that I guess one or another will have
some comments and/or additions. I hope you won't mind me creating the
branch tomorrow. I got the impression that everyone seems to agree with
the general concept. The last details can be sorted out during the next
few days if necessary.


Jeremias Maerki

Reply via email to