[ https://issues.apache.org/jira/browse/FOP-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16756056#comment-16756056 ]
Dan Caprioara commented on FOP-2776: ------------------------------------ The fix introduced a new bug. If you have two list, one nested into another, the nested list jumps to the next page instead of spreading on two pages. It is like the parent list item has a keep-together property set on it. Removing the code added by this fix solves the problem. Here is a file to test with. The item with the number 15 from the parent list item moves on the second page, together with the nested list. In FOP 2.2 the page breaking was done between the items of the nested list. {code} <?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="sample"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="sample"> <fo:flow flow-name="xsl-region-body"> <fo:block>Sample FO document</fo:block> <fo:list-block margin-bottom="1.33em" margin-top="1.33em" provisional-distance-between-starts="2em" provisional-label-separation="3pt" relative-align="baseline"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">1. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">2. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">3. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">4. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">5. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">6. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">7. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">8. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">9. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">10. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">11. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">12. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">13. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">14. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">15. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block> <fo:block-container> <fo:block end-indent="0" start-indent="0"> Now a nested long list: <fo:list-block margin-bottom="0em" margin-top="0em" provisional-distance-between-starts="2em" provisional-label-separation="3pt" relative-align="baseline"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">1. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">2. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">3. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">4. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">5. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">6. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">7. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">8. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">9. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">10. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">11. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">12. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">13. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">14. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">15. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">16. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">17. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">18. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">19. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">20. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">21. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">22. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">23. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">24. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">25. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">26. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">27. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">28. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">29. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">30. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">31. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">32. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">33. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">34. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">35. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">36. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">37. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">38. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">39. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">40. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">41. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">42. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>inner</fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </fo:block> </fo:block-container> </fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">16. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">17. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">18. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">19. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">20. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">21. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">22. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">23. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block text-align="end">24. </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block>outer</fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </fo:flow> </fo:page-sequence> </fo:root> {code} > NoSuchElementException for list changing ipd > -------------------------------------------- > > Key: FOP-2776 > URL: https://issues.apache.org/jira/browse/FOP-2776 > Project: FOP > Issue Type: Bug > Reporter: simon steiner > Assignee: simon steiner > Priority: Major > Fix For: 2.3 > > Attachments: test.fo > > > fop test.fo out.pdf > > java.util.NoSuchElementException > at org.apache.fop.layoutmgr.LMiter.next(LMiter.java:69) > at org.apache.fop.layoutmgr.LMiter.next(LMiter.java:27) > at > org.apache.fop.layoutmgr.AbstractLayoutManager.setCurrentChildLM(AbstractLayoutManager.java:132) -- This message was sent by Atlassian JIRA (v7.6.3#76005)