Thanks Jeremias,

some great improvements as far as I can see. Especially the keep together for notes.

I have tested the patch but not committed it because it broke trunk. Here is the list of problems Forrest reported:

^                                    samples-b/
^                                    samples-c/
^                                    samples-c/subdir/
^                                    samples-c/showonlywhenselected/
^                                    pluginDocs/plugins_0_90/
* [1/35]    [35/41]   7.657s 13.7Kb  linkmap.html
* [3/36]    [3/31]    1.296s 8.6Kb   samples-b/static.html
* [4/35]    [0/0]     2.829s 106.1Kb samples-b/static.pdf
* [5/39]    [5/37]    0.75s  26.7Kb  samples-b/sample.html
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. table 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. block 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. 
list-item-body (http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. list-item 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. 
list-block (http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. block 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. block 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. block 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. flow 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. 
page-sequence (http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-header (http://www.w3.org/1999/XSL/Format) vs. root 
(http://www.w3.org/1999/XSL/Format)
X [0]                                     samples-b/sample.pdf  BROKEN: 
Error(Unknown location): fo:table-header is missing child elements.
Required Content Model: marker* (table-row+|table-cell+)
* [8/37]    [1/24]    0.812s 7.2Kb   samples-c/i18n.html
* [9/36]    [0/0]     0.344s 105.7Kb samples-c/i18n.pdf
* [10/36]   [1/31]    0.609s 7.9Kb   samples-b/usemap.html
* [11/35]   [0/0]     0.532s 106.8Kb samples-b/usemap.pdf
* [12/35]   [1/25]    0.656s 6.9Kb   samples-c/showonlywhenselected/page1.html
* [13/34]   [0/0]     0.219s 104.7Kb samples-c/showonlywhenselected/page1.pdf
* [15/32]   [0/0]     11.157s 7.4Kb   images/group.png
* [16/33]   [2/31]    1.156s 10.8Kb  samples-b/embedded_html.html
* [17/36]   [4/28]    0.734s 8.9Kb   samples-c/index.html
^                                    samples-b/site:index
* [19/34]   [0/2]     0.047s 3.6Kb   samples-b/embedded_html.xml
WARN - Bookmarks: Unresolved id reference "__toc__" found.
WARN - Bookmark with IDRef "__toc__" has a null PageViewport.
* [20/33]   [0/0]     0.75s  105.0Kb linkmap.pdf
* [21/32]   [0/0]     0.0s   951b    /images/usemap.gif
* [22/33]   [2/31]    0.343s 7.8Kb   samples-b/ascii-art.html
* [23/32]   [0/0]     0.954s 107.7Kb samples-b/ascii-art.pdf
* [24/31]   [0/0]     0.234s 8.3Kb   images/project.png
* [26/30]   [1/20]    2.0s   59.4Kb  pluginDocs/plugins_0_90/index.html
^                                    pluginDocs/plugins_0_90/
* [27/30]   [1/40]    0.672s 10.3Kb  index.html
* [28/29]   [0/0]     0.25s  105.4Kb index.pdf
* [29/29]   [1/25]    0.609s 7.0Kb   samples-c/showonlywhenselected/page2.html
^                                    samples-b/ext:forrest
* [30/28]   [0/9]     0.11s  19.2Kb  samples-b/sample.xml
* [31/27]   [0/0]     0.25s  10.3Kb
* [33/25]   [0/0]     0.375s 3.2Kb   skin/basic.css
* [34/25]   [1/34]    0.641s 10.3Kb  samples-b/index.html
* [35/25]   [1/27]    0.672s 7.2Kb   samples-c/subdir/index.html
* [36/37]   [13/13]   0.343s 13.4Kb  skin/screen.css
* [38/35]   [0/0]     0.234s 319b    skin/images/rc-b-r-15-1body-2menu-3menu.png
* [39/34]   [0/0]     0.079s 209b    
skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
* [40/33]   [0/0]     0.046s 200b    
skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
* [41/32]   [0/0]     0.047s 214b    
skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
* [42/31]   [0/0]     0.047s 199b    
skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
* [44/30]   [1/20]    0.609s 5.5Kb   samples-a/index.html
* [45/29]   [0/0]     0.25s  105.0Kb samples-a/index.pdf
* [46/28]   [0/0]     0.047s 214b    
skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
* [47/27]   [0/0]     0.062s 1.3Kb   skin/print.css
* [48/26]   [0/0]     0.047s 390b    skin/images/rc-t-r-15-1body-2menu-3menu.png
^                                    pluginDocs/plugins_0_90/
^                                    samples-b/
* [50/37]   [13/49]   0.812s 30.9Kb  samples-b/linking.html
* [51/36]   [0/0]     0.281s 1.9Kb   /images/ellipse-2.png
* [52/35]   [0/0]     0.063s 2.0Kb   images/icon-a.png
* [53/34]   [0/0]     0.078s 1.9Kb   /images/sub-dir/icon-c.png
* [54/33]   [0/0]     0.219s 1.9Kb   samples-b/ellipse.png
* [56/31]   [0/0]     0.031s 2.0Kb   ../images/icon-b.png
* [57/30]   [0/0]     0.047s 1.7Kb   /images/icon-e.png
* [58/29]   [0/0]     0.031s 1.1Kb   samples-b/helloAgain.pdf
* [59/28]   [0/0]     2.797s 153.6Kb samples-b/linking.pdf
* [60/27]   [0/0]     0.031s 2.0Kb   samples-b/images/icon-a.png
* [62/25]   [0/0]     0.047s 4.5Kb   samples-b/images/project-logo.png
WARN - Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. table 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. block 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. block 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. block 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. block 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. block 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. flow 
(http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. 
page-sequence (http://www.w3.org/1999/XSL/Format)
WARN - Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. root 
(http://www.w3.org/1999/XSL/Format)
X [0]                                     pluginDocs/plugins_0_90/index.pdf     
BROKEN: Error(Unknown location): fo:table-body is missing child elements.
Required Content Model: marker* (table-row+|table-cell+)
* [64/23]   [0/0]     0.578s 106.1Kb samples-c/index.pdf
* [65/23]   [1/24]    0.328s 6.8Kb   samples-c/demo-i18n.html
* [66/22]   [0/0]     0.328s 105.4Kb samples-c/demo-i18n.pdf
* [67/21]   [0/0]     0.219s 104.7Kb samples-c/showonlywhenselected/page2.pdf
* [68/20]   [0/0]     0.484s 2.2Kb   samples-b/cocoon-pyramid.png
* [69/19]   [0/0]     0.157s 199b    
skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
* [70/18]   [0/0]     0.015s 696b    samples-b/images/icon.png
* [71/18]   [1/30]    0.563s 8.0Kb   samples-b/faq.html
* [72/17]   [0/0]     0.344s 106.6Kb samples-b/faq.pdf
* [73/16]   [0/0]     0.312s 215b    
skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
* [74/15]   [0/0]     0.016s 2.0Kb   samples-b/icon-d.png
* [75/14]   [0/0]     0.031s 285b    images/instruction_arrow.png
* [76/14]   [1/30]    0.453s 16.7Kb  samples-b/howto-howto.html
* [77/13]   [0/0]     0.5s   127.3Kb samples-b/howto-howto.pdf
* [79/11]   [0/0]     0.563s 106.4Kb samples-b/index.pdf
* [80/12]   [2/31]    0.343s 8.2Kb   samples-b/customSchema.html
WARN - Bookmarks: Unresolved id reference "__toc__" found.
WARN - Bookmark with IDRef "__toc__" has a null PageViewport.
* [81/11]   [0/0]     0.516s 103.5Kb samples-b/customSchema.pdf
* [82/11]   [1/31]    0.25s  6.3Kb   samples-b/custom.html
WARN - Bookmarks: Unresolved id reference "__toc__" found.
WARN - Bookmark with IDRef "__toc__" has a null PageViewport.
* [83/10]   [0/0]     0.141s 102.2Kb samples-b/custom.pdf
* [84/10]   [1/33]    1.312s 12.0Kb  samples-b/locationmap/index.html
* [85/9]    [0/0]     0.281s 109.7Kb samples-b/locationmap/index.pdf
* [86/8]    [0/0]     0.063s 348b    skin/images/rc-b-l-15-1body-2menu-3menu.png
* [87/7]    [0/0]     0.14s  4.1Kb   skin/profile.css
* [88/6]    [0/0]     0.094s 743b    samples-c/subdir/hello.zip
* [89/5]    [0/0]     0.187s 104.5Kb samples-c/subdir/index.pdf
* [90/4]    [0/0]     0.016s 1.8Kb   images/built-with-forrest-button.png
* [91/5]    [2/32]    0.578s 7.1Kb   samples-b/svg.html
* [92/4]    [0/0]     0.031s 1.2Kb   samples-b/ellipse.svg
WARN - Bookmarks: Unresolved id reference "__toc__" found.
WARN - Bookmark with IDRef "__toc__" has a null PageViewport.
* [93/3]    [0/0]     0.156s 102.7Kb samples-b/svg.pdf
* [94/2]    [0/0]     0.61s  115.1Kb samples-b/embedded_html.pdf
* [95/1]    [0/0]     0.031s 1.1Kb   hello.pdf
* [96/1]    [1/30]    0.578s 8.7Kb   samples-b/xml-entities.html
WARN - Bookmarks: Unresolved id reference "__toc__" found.
WARN - Bookmark with IDRef "__toc__" has a null PageViewport.
* [97/0]    [0/0]     0.187s 104.6Kb samples-b/xml-entities.pdf
Total time: 1 minutes 2 seconds,  Site size: 2.875.354 Site pages: 83
Java Result: 1

 Copying broken links file to site root.

Copying 1 file to C:\forrest\head\build\test_skinned_site\build\site

BUILD FAILED
C:\forrest\head\main\build.xml:371: The following error occurred while 
executing this line:
C:\forrest\head\main\build.xml:373: The following error occurred while 
executing this line:
C:\forrest\head\main\build.xml:383: The following error occurred while 
executing this line:
C:\forrest\head\main\targets\site.xml:183: Error building site.

There appears to be a problem with your site build.

Read the output above:
* Cocoon will report the status of each document:
   - in column 1: *=okay X=brokenLink ^=pageSkipped (see FAQ).
* Even if only one link is broken, you will still get "failed".
* Your site would still be generated, but some pages would be broken.
 - See C:\forrest\head\build\test_skinned_site\build\site/broken-links.xml

Total time: 2 minutes 53 seconds