- From: Tamsin <tamsin@anorakgirl.co.uk>
- Date: Fri, 23 Oct 2009 19:49:36 +0100
- To: <www-xsl-fo@w3.org>
Hi, Thanks for the suggestion, I will experiment with this, as the idea would certainly solve the problem (Basically don't start the second section on the same page if you're really near the bottom). I think the problem will be that I have oversimplified the situation. My region body has two columns, and what I have been calling 'block B' is actually a short block header which spans both columns, followed by a long block which does not span columns (hence my other post about getting the spanning block to stick with the non-spanning block). I don't think I can put both in a block-container without losing the span/don't span ability - May have to get customer to agree to some simplifications! Thanks for looking into this, and I will be sure to review the XSL 2.0 requirements. Tamsin -----Original Message----- From: www-xsl-fo-request@w3.org [mailto:www-xsl-fo-request@w3.org] On Behalf Of Tony Graham Sent: 22 October 2009 22:34 To: www-xsl-fo@w3.org Subject: Re: conditional page break On Thu, Oct 22 2009 15:07:13 +0100, John.Virgo@xerox.com wrote: > Could you provide a little more detail around the flow-map? The flow map directs flows to regions. In XSL 1.1, you can have more than one fo:region-body within a fo:simple-page-master, and each xsl:region-body has to have a different "region-name" and may have different positions on the page. See http://www.w3.org/TR/xsl11/#d0e7194 for flow-map examples. Unfortunately, I couldn't solve Tamsin's problem using flow-maps after all: the best that I could do on the second page was to put A and B in different regions, so it couldn't look like B directly followed A when A overflowed onto the second page. However, if A is always going to be large enough, and B is never going to be small enough, that all of A and all of B can fit on one page, then you can put B in a fo:block-container, specify a mimimum block-progression-dimension, and set overflow to "repeat". If the minimum is larger than the maximum BPD that A will leave on the first page, then B will always start on the second page, but if B overflows that page, it will just generate more areas on the third page. The issue then becomes whether A will always leave enough room on the second page for B's minimum BPD, otherwise B would start on the third page instead of on the second page after the end of the large A. ------------------------------------------------------------ <?xml version="1.0" encoding="utf-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink"> <fo:layout-master-set> <fo:simple-page-master page-height="297mm" page-width="210mm" margin-right="0.75in" margin-left="0.2in" margin-bottom="0.0in" margin-top="0.375in" master-name="a"> <fo:region-body margin-bottom="0.9in" margin-top="0.6in" region-name="xsl-region-body"/> </fo:simple-page-master> <fo:page-sequence-master master-name="master"> <fo:repeatable-page-master-reference master-reference="a"/> </fo:page-sequence-master> </fo:layout-master-set> <fo:page-sequence master-reference="master"> <fo:flow flow-name="xsl-region-body" font-size="72pt"> <fo:block>A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A</fo:block> <fo:block-container overflow="repeat" block-progression-dimension.minimum="200mm"><fo:block>B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B</fo:block></fo:block-container> </fo:flow> </fo:page-sequence> <fo:page-sequence master-reference="master"> <fo:flow flow-name="xsl-region-body" font-size="72pt"> <fo:block>A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A</fo:block> <fo:block-container overflow="repeat" block-progression-dimension.minimum="200mm"><fo:block>B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B</fo:block></fo:block-container> </fo:flow> </fo:page-sequence> </fo:root> ------------------------------------------------------------ Regards, Tony Graham Tony.Graham@MenteithConsulting.com Director W3C XSL FO SG Invited Expert Menteith Consulting Ltd XML Guild member XML, XSL and XSLT consulting, programming and training Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland Registered in Ireland - No. 428599 http://www.menteithconsulting.com -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- xmlroff XSL Formatter http://xmlroff.org xslide Emacs mode http://www.menteith.com/wiki/xslide Unicode: A Primer urn:isbn:0-7645-4625-2
Received on Friday, 23 October 2009 18:54:44 UTC