[xsl] inserting page-break after certain terms

Subject: [xsl] inserting page-break after certain terms
From: Andreas Peter <info@xxxxxxxxxx>
Date: Tue, 03 Jul 2007 09:38:15 +0200
Hello XSL-list,

I have the following scenario:

I declared a local variable where I count the lines and convert them
to [mm] to achieve the height of a certain <section> which includes
several elements.

I know that the print space is 180mm high. Now I want to create a loop
where I count the height of <section> until it is smaller or even than
180mm and insert a page-break afterwards.

The next step should be to check if the rest of the space is 20mm,
40mm, 60mm and so on.

This is what I have written so far.


<xsl:choose> <xsl:when test="180 - sum($gesamt) = 20"> <xsl:apply-templates/> </xsl:when> <xsl:when test="180 - sum($gesamt) = 40"> <xsl:apply-templates/> </xsl:when> <xsl:when test="180 - sum($gesamt) = 60"> <xsl:apply-templates/> </xsl:when> <xsl:when test="180 - sum($gesamt) = 90"> <xsl:apply-templates/> </xsl:when> </xsl:choose>

I think after the page-break the variable $gesamt should be "zero". Is
this possible with ...select="0"?

Does anyone outthere have a hint for me how to solve this problem? If
I use the code above I only receive one block per page.

I hope this is not too confusing :-) Thanks so much for helping me.

Andreas

Current Thread