[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] [FO] Conditional page break
Subject: [xsl] [FO] Conditional page break From: Troy Ely <tchaos@xxxxxxxxx> Date: Thu, 29 Aug 2002 09:46:28 -0700 (PDT) |
Hello all, I have been handed an application with a failing business requirement, and I have had little luck in remedying the error. The app sends xml similar to the following: <letter> <section title="The Boarding House"> Mrs Mooney was a butcher's daughter. She was a woman who was quite able to keep things to herself: a determined woman. She had married her father's foreman, and opened a butcher's shop near Spring Gardens. But as soon as his father-in-law was dead Mr Mooney began to go to the devil. He drank, plundered the till, ran headlong into debt. It was no use making him take the pledge: he was sure to break out again a few days after. By fighting his wife in the presence of customers and by buying bad meat he ruined his business. One night he went for his wife with the cleaver, and she had to sleep in a neighbour's house. </section> <section title="After the Race"> The cars came scudding in towards Dublin, running evenly like pellets in the groove of the Naas Road. At the crest of the hill at Inchicore sightseers had gathered in clumps to watch the cars careering homeward, and through this channel of poverty and inaction the Continent sped its wealth and industry. Now and again the clumps of people raised the cheer of the gratefully oppressed. Their sympathy, however, was for the blue cars - the cars of their friends, the French. </section> <signature> James Joyce </signature> <CCs> <cc>Poe</cc> <cc>Maupassant</cc> </CCs> <docstamp> JJ:1914:ss12345 </docstamp> </letter> Currently, the app turns each element into an fo:block. The signature, CCs, and docstamp elements are kept together using (hopefully) appropriate keep statements. section elements are turned into blocks with the attribute widows=3 to apply a better pagesetting technique. This works as expected for sections that would widow lines -- the appropriate number of lines starts the page, and in the case of the last section, the text is followed by the sig/cc/docstamp trio correctly. However, the business requires that the sig/cc/docstamp combination never appear on a page by itself -- there must always be at least 2 lines of text preceding it. Is there a way to force a certain number of lines to the next page, when the content of the block will fit within a page? I'm fine with always requiring a page break before the ending trio, just entirely flustered on how to grab 2 lines from the block before. Thanks for your help, -troy __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL Script for XMetal2.1, Uslu, Cihan Y (MED) | Thread | Re: [xsl] [FO] Conditional page bre, G. Ken Holman |
Re: [xsl] SAXParseException, David Carlisle | Date | Re: [xsl] SAXParseException, Manish Shah |
Month |
Keywords