[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: inserting page-break after certain terms

Subject: Re: inserting page-break after certain terms
From: Tony Graham <Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 04 Jul 2007 12:52:18 +0100
Re:  inserting page-break after certain terms
On Tue, Jul 03 2007 08:38:15 +0100, info@xxxxxxxxxx wrote:
...
> 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.

What you are attempting is not clear to me, at least.  It may help if
you can post a bit more of your solution.

Since you use xsl:apply-templates each time, why not just test that
sum($gesamt) <= 180?

I don't know if you expect the variable $gesamt to change, but it won't
be updated once assigned.

What sort of output are you producing?  XSL-FO?

Regards,


Tony Graham.
======================================================================
Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx   http://www.menteithconsulting.com

Menteith Consulting Ltd             Registered in Ireland - No. 428599
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
======================================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.