Subject: Re: [xsl] Seperating Heading from Content|
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 07 Nov 2011 13:28:43 -0500
What I try to achieve is the following:
In a very standard PDF publication I want the 'body' content always appear at the same height on every page. But part of this content is a H2 heading (yes, I'm in the process of transforming xHTML data to a nicely styled PDF).
I have set up all pages according to the client's specs (the 'fo:layout-master-set'), and now I'm defining the individual page sets, including the one where the 'body' goes into (<fo:flow flow-name="xsl-region-body">). And there it doesn't go the way I want it.
Because the 'H2' is part of the body, I don't know of a way how to 'seperate' this from the rest of the content.
I want the 'H2' (whenever it is available) always appear at the top of the page with a distance of 45mm from the top. The rest of the body I want to appear at 65mm from the top, always no matter if it is preceeded with a 'H2' or not.
To be more specific:
When in the body a 'H2' is encountered, I put it on new page ('page-break-before="always"' in the '<xsl:template match="h2">' definition) 45mm from the top, and after that the rest of the body (content) appears 20 mm (65mm from the top) after the 'H2'. But that content spans more then one page. And I want that content (without any 'H2') on the other pages to appear at the same height as on the page where it started after the 'H2'; 65mm from the top. To be more visual; every 'H2' must be positioned above the rest of the flowing body content.
How can I accomplish that?
-- Contact us for world-wide XML consulting and instructor-led training Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/t37DVX Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal