xsl-list
[Top] [All Lists]

Re: [xsl] RE: Seperating Heading from Content

2011-11-08 10:47:28
At 2011-11-08 17:29 +0100, Struijk, Toon van der wrote:
Ken, I've worked with <fo:static-content> before but not with markers. So could you provide me some code examples on how this works.

You don't say where you are having problems with the XSL-FO documentation, so I don't know what to clarify for you.

The example below relates my earlier instructions.

Chapter 8 section 2 of my "Practical Formatting Using XSL-FO" describes how markers work, with a helpful diagram on qualifying areas. This book can be downloaded from our web site according to our "Try and Buy" policy: if someone decides not to delete their preview copy, they are asked to please pay for it.

I hope this helps.

. . . . . . . . . . Ken

<?xml version="1.0" encoding="US-ASCII"?><!--toon.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format";
      font-family="Times" font-size="20pt">

  <layout-master-set>
    <simple-page-master master-name="frame"
                        page-height="297mm" page-width="210mm"
                        margin-top="15mm" margin-bottom="15mm"
                        margin-left="15mm" margin-right="15mm">
      <region-body region-name="frame-body" margin-top="15mm"/>
      <region-before region-name="header" extent="15mm"/>
    </simple-page-master>
  </layout-master-set>

  <page-sequence master-reference="frame">
    <static-content flow-name="header">
      <block><retrieve-marker retrieve-class-name="h2"/></block>
    </static-content>
    <flow flow-name="frame-body">
      <!--define the header at the start of each page-->
      <block break-before="page">
        <marker marker-class-name="h2">First H2</marker>
      </block>
      <!--empty the header for any page breaks before the next header-->
      <block><marker marker-class-name="h2"/></block>
      <block>This is a test</block>
      <block>This is a test</block>
      <block>This is a test</block>
      <block>This is a test</block>
      <block break-before="page">This is a test</block>
      <block>This is a test</block>
      <block>This is a test</block>
      <!--define the header at the start of each page-->
      <block break-before="page">
        <marker marker-class-name="h2">Second H2</marker>
      </block>
      <!--empty the header for any page breaks before the next header-->
      <block><marker marker-class-name="h2"/></block>
      <block>This is a test</block>
      <block>This is a test</block>
      <block>This is a test</block>
      <block>This is a test</block>
      <block break-before="page">This is a test</block>
      <block>This is a test</block>
    </flow>
  </page-sequence>
</root>


--
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(_at_)CraneSoftwrights(_dot_)com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>