title: Put XSL-FO table on same page instead of moving it across next page
body: <p>I am using XSL -FO  templates to generate PDF from xsl.In my PDF , I am having some tables which will be populated by dynamic data(no control over the rows that are generated). I am having some static content in the PDF after which the table is expected.The current behavior is something like, in the pdf , if the static content occupies till the middle of the page, and the table having dynamic content has got many number of rows, the table is getting shifted to the next page , leaving the space after static content blank. I want the behavior to be something like ,in the PDF , the table should start immediately after the static content in the same page and allow the permissible no of the rows in that page and continue the table in the next page if the table doesn't fit the previous page.  </p>
  
  <p>I am adding the code hereby for better clarity.</p>
  
  <pre><code> &lt;fo:block&gt;
      &lt;fo:block&gt;
          &lt;fo:table xsl:use-attribute-sets="tablestyle1"&gt;
          &lt;fo:table-column xsl:use-attribute-sets="tablecoll" /&gt;
          &lt;fo:table-column xsl:use-attribute-sets="tablecoll"/&gt;
          &lt;fo:table-column xsl:use-attribute-sets="tablecoll" /&gt;
          &lt;fo:table-column xsl:use-attribute-sets="tablecoll" /&gt;
          &lt;fo:table-column xsl:use-attribute-sets="tablecoll" /&gt;
              &lt;fo:table-body&gt;
                  &lt;fo:table-row xsl:use-attribute-sets="tabletr"&gt;
                      &lt;fo:table-cell font-weight="bold" xsl:use-attribute-sets="tabletd"&gt;
                          &lt;fo:block&gt;
                              &lt;xsl:text disable-output-escaping="yes"&gt;&amp;#xA;&lt;/xsl:text&gt;
                          &lt;/fo:block&gt;
                      &lt;/fo:table-cell&gt;
                      &lt;fo:table-cell font-weight="bold" xsl:use-attribute-sets="tabletd"&gt;
                          &lt;fo:block&gt;Name&lt;/fo:block&gt;
                      &lt;/fo:table-cell&gt;
                      ( 3 more cells here..)
                  &lt;/fo:table-row&gt;
  
  
                  &lt;xsl:for-each
                      select="(value is being fetched from function)"&gt;
                      &lt;fo:table-row xsl:use-attribute-sets="tabletr"&gt;
                          &lt;fo:table-cell font-weight="bold" xsl:use-attribute-sets="tabletd"&gt;
                              &lt;fo:block&gt;
                                  &lt;xsl:value-of select="position()" /&gt;
                              &lt;/fo:block&gt;
                          &lt;/fo:table-cell&gt;
  
                          &lt;fo:table-cell xsl:use-attribute-sets="tabletd"&gt;
                              &lt;fo:block&gt;
                                  &lt;xsl:choose&gt;
                                      &lt;xsl:when
                                          test="./Name/Title!='' or ./Name/ForeName !='' or ./Name/SecondInitial!='' or ./Name/Surname!=''"&gt;
                                          &lt;xsl:call-template name="format-name1"&gt;
                                              &lt;xsl:with-param name="name" select="./Name/Title" /&gt;
                                          &lt;/xsl:call-template&gt;
                                          &lt;xsl:text&gt; &lt;/xsl:text&gt;
                                          &lt;xsl:call-template name="format-name1"&gt;
                                              &lt;xsl:with-param name="name" select="./Name/ForeName" /&gt;
                                          &lt;/xsl:call-template&gt;
                                          &lt;xsl:text&gt; &lt;/xsl:text&gt;
                                          &lt;xsl:call-template name="format-name1"&gt;
                                              &lt;xsl:with-param name="name" select="./Name/Surname" /&gt;
                                          &lt;/xsl:call-template&gt;
                                      &lt;/xsl:when&gt;
                                      &lt;xsl:otherwise&gt;
                                          &lt;xsl:text disable-output-escaping="yes"&gt;&amp;#xA;&lt;/xsl:text&gt;
                                      &lt;/xsl:otherwise&gt;
                                  &lt;/xsl:choose&gt;
                              &lt;/fo:block&gt;
                          &lt;/fo:table-cell&gt;
                              &lt;fo:table-cell xsl:use-attribute-sets="tabletd"&gt;
                              (few more table cells are populated here using for - each iteration)
                              .
                              .
                              &lt;/fo:table-cell&gt;
                              &lt;/fo:table-body&gt;
          &lt;/fo:table&gt;
      &lt;/fo:block&gt;
  &lt;/fo:block&gt;
  </code></pre>