HI, I'm using fop 0.91beta with saxonb 8 and jre1.4.2_03 on windows. I'm updating styles which I used with fop 0.20.05 and having the following issue:
When a fo:table has a fo:table-header, the property break-after="page" on the table causes the page to break before the end of region-body, despite there is room for a few more table rows. Below some test code (XSL1). This seems to occur even when instead of a break-after property on the table, each table (with row header) is placed in a page-sequence (see test code XSL2). The height of this space seems to coincide with or be influenced by the height of the row header. Has anyone found a work-around? Thank you Cinzia TEST CODE **XSL1 <?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:variable name="column-width" select="20"/> <xsl:template match="ReportDetails"> <fo:root font-family="Verdana" font-size="6pt" color="#666666"> <fo:layout-master-set> <fo:simple-page-master master-name="A4Portrait" page-height="29.7cm" page-width="21cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm" margin- top="1cm"> <fo:region-body region-name="body" /> <fo:region-after extent="1cm" region-name="footer"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="A4Portrait"> <fo:flow flow-name="body"> <fo:block background-color="#cccccc"> <xsl:apply-templates select="current()" mode="table"/> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <!-- correct page break --><!-- <xsl:template match="node()" mode="table"> <xsl:variable name="break-after"> <xsl:choose> <xsl:when test="position() = last()"><xsl:value-of select="'auto'"/></xsl:when> <xsl:otherwise><xsl:value-of select="'page'"/></xsl:otherwise> </xsl:choose> </xsl:variable> <fo:block text-align="left"> <fo:table break-after="{$break-after}" table-layout="fixed" border="1pt solid #666666" width="{$column-width}pt"> <fo:table-column column-width="{$column-width}pt"/> <fo:table-body> <xsl:apply-templates select="//Item"/> </fo:table-body> </fo:table> </fo:block> </xsl:template> --> <!-- INcorrect page break --> <xsl:template match="node()" mode="table"> <xsl:variable name="break-after"> <xsl:choose> <xsl:when test="position() = last()"><xsl:value-of select="'auto'"/></xsl:when> <xsl:otherwise><xsl:value-of select="'page'"/></xsl:otherwise> </xsl:choose> </xsl:variable> <fo:block text-align="left"> <fo:table break-after="{$break-after}" table-layout="fixed" border="1pt solid #666666" width="{$column-width}pt"> <fo:table-column column-width="{$column-width}pt"/> <fo:table-header> <fo:table-row height="60pt"> <fo:table-cell><fo:block>header</fo:block></fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> <xsl:apply-templates select="//Item"/> </fo:table-body> </fo:table> </fo:block> </xsl:template> <xsl:template match="Item"> <fo:table-row height="12pt"> <fo:table-cell border="1pt solid #666666"><fo:block><xsl:value-of select="."/></fo:block></fo:table-cell> </fo:table-row> </xsl:template> </xsl:stylesheet> **XSL2 <?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:variable name="column-width" select="20"/> <xsl:variable name="item-count" select="count(//Item)"/> <xsl:template match="ReportDetails"> <fo:root font-family="Verdana" font-size="6pt" color="#666666"> <fo:layout-master-set> <fo:simple-page-master master-name="A4Portrait" page-height="29.7cm" page-width="21cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm" margin- top="1cm"> <fo:region-body region-name="body" /> <fo:region-after extent="1cm" region-name="footer"/> </fo:simple-page-master> </fo:layout-master-set> <xsl:apply-templates select="current()" mode="page"> <xsl:with-param name="node-from-pos" select="1"/> <xsl:with-param name="node-to-pos" select="48"/> </xsl:apply-templates> </fo:root> </xsl:template> <xsl:template match="node()" mode="page"> <xsl:param name="node-from-pos"/> <xsl:param name="node-to-pos"/> <fo:page-sequence master-reference="A4Portrait"> <fo:flow flow-name="body"> <fo:block background-color="#cccccc"> <fo:block>NEW page</fo:block> <xsl:apply-templates select="current()" mode="table"> <xsl:with-param name="node-from-pos" select="$node-from-pos"/> <xsl:with-param name="node-to-pos" select="$node-to-pos"/> </xsl:apply-templates> </fo:block> </fo:flow> </fo:page-sequence> <xsl:if test="($node-to-pos + 1) < $item-count"> <xsl:apply-templates select="current()" mode="page"> <xsl:with-param name="node-from-pos" select="$node-to-pos + 1"/> <xsl:with-param name="node-to-pos" select="$item-count"/> </xsl:apply-templates> </xsl:if> </xsl:template> <xsl:template match="node()" mode="table"> <xsl:param name="node-from-pos"/> <xsl:param name="node-to-pos"/> <xsl:variable name="items" select="Item[(position() >= number($node-from- pos)) and (position() <= number($node-to-pos))]"/> <fo:block><xsl:value-of select="$node-from-pos"/>,<xsl:value-of select="$node-to-pos"/>,<xsl:value-of select="$item-count"/></fo:block> <fo:block text-align="left"> <fo:table table-layout="fixed" border="1pt solid #666666" width="{$column- width}pt"> <fo:table-column column-width="{$column-width}pt"/> <fo:table-header> <fo:table-row height="60pt"><fo:table- cell><fo:block>Hdr</fo:block></fo:table-cell></fo:table-row></fo:table-header> <fo:table-body> <xsl:apply-templates select="$items"/> </fo:table-body> </fo:table> </fo:block> </xsl:template> <xsl:template match="Item"> <fo:table-row height="12pt"> <fo:table-cell border="1pt solid #666666"><fo:block><xsl:value-of select="."/></fo:block></fo:table-cell> </fo:table-row> </xsl:template> </xsl:stylesheet> **XML <?xml version="1.0" encoding="utf-8"?> <ReportDetails xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Item>01</Item> <Item>02</Item> <Item>03</Item> <Item>04</Item> <Item>05</Item> <Item>06</Item> <Item>07</Item> <Item>08</Item> <Item>09</Item> <Item>10</Item> <Item>11</Item> <Item>12</Item> <Item>13</Item> <Item>14</Item> <Item>15</Item> <Item>16</Item> <Item>17</Item> <Item>18</Item> <Item>19</Item> <Item>20</Item> <Item>21</Item> <Item>22</Item> <Item>23</Item> <Item>24</Item> <Item>25</Item> <Item>26</Item> <Item>27</Item> <Item>28</Item> <Item>29</Item> <Item>30</Item> <Item>31</Item> <Item>32</Item> <Item>33</Item> <Item>34</Item> <Item>35</Item> <Item>36</Item> <Item>37</Item> <Item>38</Item> <Item>39</Item> <Item>40</Item> <Item>41</Item> <Item>42</Item> <Item>43</Item> <Item>44</Item> <Item>45</Item> <Item>46</Item> <Item>47</Item> <Item>48</Item> <Item>49</Item> <Item>50</Item> <Item>51</Item> <Item>52</Item> <Item>53</Item> <Item>54</Item> <Item>55</Item> <Item>56</Item> <Item>57</Item> <Item>58</Item> <Item>59</Item> <Item>50</Item> <Item>61</Item> <Item>62</Item> <Item>63</Item> <Item>64</Item> <Item>65</Item> <Item>66</Item> <Item>67</Item> <Item>68</Item> <Item>69</Item> <Item>70</Item> </ReportDetails> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
