Andreas Delmelle wrote:
On Nov 1, 2008, at 13:08, Sheldon Glickler wrote:

Andreas Delmelle wrote:
On Oct 31, 2008, at 20:03, Sheldon Glickler wrote:
I have a report that has an arbitrary number of columns. The number of columns is such that it would go beyond the page width. Also the number of rows is such that it goes beyond the page height.
Problematic. XSL-FO 1.1 knows no 'vertical' page-breaks. The table will only be broken in block-progression-direction (if there is no keep-property telling us otherwise), and clipped if it doesn't fit the page in inline-progression-direction. None of your proposed fallbacks are possible in XSL-FO, IIRC. Not only in FOP, but any implementation...
Cheers
Andreas

Wow!  That is **some** major drawback.

On the 'bright' side, I know this particular feature to be among the XSL-FO 2.0 requirements...

First, I am using .20-5 (and cannot upgradee). I had envisioned doing something with coding. I know how wide my columns are and how many rows will fit on a page.

I imagine I could use two loops, one for horizontal and one for vertical. That would mean, for the horizontal, writing the header block as Header1_1, Header1_2, etc. I would then have in the XSL templates for Header1_1, FirstColumns1_1, Body1_1, Header1_2, FirstColumns1_2, Body1_2, etc. where FirstColumns1_2 was a repeat of FirstColumns1_1.

If there were a "page break" instruction, I could then limit the Body1, Body2 to those lines that fit, and then repeat with Header2_1, FirstColumns2_1, Body2_1, Header2_2, FirstColumns2_2, Body2_2, etc. where Header2_1 was a repeat of Header1_1 and FirstColumns2_2 was a repeat of FirstColumns2_1and so on.

You mean, something like: break-before="page" or break-after="page"? (see: http://www.w3.org/TR/xsl/#d0e26492)

That was along the lines I was thinking this issue /might/ be solvable: pre-compute the breaks and insert them as forced breaks in the XSLT. You would have to split the content into multiple tables so that the FO processor would always get tables that fit entirely into one page.

Ok, it seems I need a line like:

<xsl:attribute name="break-after">page</xsl:attribute>

inside the <fo:table>. The problem now is that it goes in the xsl, but I do all my calculations to generate the xml, not the xsl. Would this work?

In the xsl I would have:

<xsl:template match-"page_1">
  <xsl:apply-templates select="header" />
  <xsl:apply-templates select="data_columns" />
  <xsl:apply-templates select="break_page">
</xsl:template>

<xsl:template match="break_page">
  <fo:table>
    <xsl:attribute name="break-after">page</xsl:attribute>
  </fo:table>
</xsl:template>

and in the xml forcing a page break with
<break_page></break_page>

....or not even adding anything to the xml at all? The pages (_1 to _20) have already been determined in the xml by column and row count.

                



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to