On Sep 25, 2007, at 09:01, Simon Pepping wrote:

Hi Simon

I've been browsing through the branch a bit, and

The code I submitted passes 222 out of 341 layout-standard
unit tests. Normal paragraphs are formatted properly. The errors are
in mainly in footnotes, list items, tables, and markers.

As far as I can tell for the moment, the error is virtually always the same ClassCastException, since the related LMs expect a list of KnuthElements, where they currently get a list of ListElements. A KnuthElement is always a ListElement, but not vice versa. The newly added ParagraphListElement, for instance, is not a KnuthElement. This seems to be causing the CCE's.

Either the code in ListItemLM and others needs to be adapted to deal with ListElements instead of KnuthElements, or the ParagraphListElement needs to subclass KnuthElement instead of ListElement directly.

The second option was the easiest to try out, so I went ahead. It avoids the CCE's, but causes NullPointerExceptions further on in many cases. OTOH, that small change already makes some 20 more tests pass (mainly the list-related tests), so it does seem like something...

I'm going to play with these possibilities a bit more during the weekend, and will keep you updated on any progress.


Cheers

Andreas

Reply via email to