It has been reported on fop-user that the current keep implementation is probably too strict, that is instead of weakening a keep condition if no solution can be found FOP trunk currently gives up with an error message.
I had a quick fiddle in one area and changed the Knuth penalty generated for a keep...="always" from INFINITE to INFINITE-1. In my few test cases that seem to have resolved the issue. However, I am interested in comments of those more familiar with the mathematical background behind the Knuth algorithm if such a solution is appropriate or if there could be unintended side effects, e.g. this INFINITE-1 break being chosen even if there are other allowed breaks which should be preferred according to the FO input but have higher penalties when run through the Knuth algorithm. Or should we use a more refined approach were we generate initially an INFINITE penalty but if the page breaking cannot find a solution we reduce the penalty on some/all of those elements given an INFINITE penalty because of keeps and run the page breaker again? Manuel