Subject: Re: [xsl] [FO] image on even, table on odd, repeating image if the table is more than one page From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 11 Jul 2012 22:37:08 -0400 |
well, I have a bunch of sections in a book, each section has one partlist (= one table) and each partlist (table) has exactly one image with it The image the table and some titles is all there is to a section
A section needs an even number of pages,
starting with the image on the even page and the table on the odd page
if the table overflows to the next page, it needs to flow over to the next odd page,
and I need the image to repeat on the even page in between
I can figure out what the image is when the section starts, so indeed I believe that Kens approach will likely work
I started implementing this but got stuck on step one, it seems FOP doesn't like the way I force the even page to be empty so I would indeed appreciate some code
~/y/samp $ cat partslist.fo <?xml version="1.0" encoding="utf-8"?><!--partslist.fo--> <!DOCTYPE root [ <!ENTITY % geometry SYSTEM "pages.ent"> %geometry; ]> <root font-family="Times" font-size="20pt" xmlns="http://www.w3.org/1999/XSL/Format">
<layout-master-set> <simple-page-master master-name="frame-odd" 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="13mm" margin-bottom="13mm"/> </simple-page-master> <simple-page-master master-name="frame-even" page-height="297mm" page-width="210mm" margin-top="15mm" margin-bottom="15mm" margin-left="15mm" margin-right="15mm"> <region-body region-name="frame-image" margin-top="13mm" margin-bottom="13mm"/> </simple-page-master> <page-sequence-master master-name="frame-pages"> <repeatable-page-master-alternatives> <conditional-page-master-reference odd-or-even="even" master-reference="frame-even"/> <conditional-page-master-reference odd-or-even="odd" master-reference="frame-odd"/> </repeatable-page-master-alternatives> </page-sequence-master> </layout-master-set>
<page-sequence master-reference="frame-pages"> <flow flow-name="frame-body"> <block>Filler first page</block> </flow> </page-sequence>
<block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block> <block>A table of parts goes here.</block>
</root> ~/y/samp $ cat pages.ent <!--pages-a4.ent - for use as "pages.ent"--> <!--Simple page geometry for testing basic constructs--> <!--A4 page size-->
<!--copy this file over top of the "pages.ent" file to have the examples produce the desired page size. -->
<!ENTITY page-width "210mm"> <!ENTITY page-height "297mm"> <!ENTITY margin-top "15mm"> <!ENTITY margin-bottom "15mm"> <!ENTITY margin-left "15mm"> <!ENTITY margin-right "15mm"> <!ENTITY before-extent "13mm"> <!ENTITY after-extent "13mm">
<!--end of file--> ~/y/samp $
-- Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012 Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] [FO] image on even, table, Geert Bormans | Thread | Re: [xsl] [FO] image on even, table, Geert Bormans |
Re: [xsl] [FO] image on even, table, Geert Bormans | Date | Re: [xsl] [FO] image on even, table, J.Pietschmann |
Month |