xsl-list
[Top] [All Lists]

[xsl] inserting page-break after certain terms

2007-07-03 00:38:43
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>