Subject: Re: [xsl] inserting page-break after certain terms From: Tony Graham <Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 04 Jul 2007 12:52:18 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] inserting page-break after ce, Andreas Peter | Thread | Re: [xsl] inserting page-break afte, Andreas Peter |
Re: [xsl] howto convert node set in, Andrew Welch | Date | Re: [xsl] howto convert node set in, Tony Graham |
Month |