Subject: [xsl] XSL-FO page layout question From: "Cindy Hunt" <Cindy.Hunt@xxxxxxx> Date: Thu, 29 Mar 2007 09:58:38 -0400 |
I am struggling with my logic for XSL-FO page layouts and wanted to see if anyone has any suggestions for what I am trying to do. I have looked at a ton of examples but the short FO "Hello World" examples (without the XSL that got them there) aren't cutting it for me. I am formatting with Antenna House. I am trying to define a page layout for my chapter pages so that the first page in a chapter has a running head with the page number only and then the rest of the odd and even pages use a different running head along with the page number. I am not having trouble with this for the first chapter I lay down but then any succeeding chapters' first page just use the odd/even layouts and doesn't go back to the layout I made for the first page. I am suspecting it must be something wrong with my XSL. I have copied my code below if anyone has any comments. I have suspicions about my fo:flow code. I am starting the flow at my <body> tag which contains the chapters. So it hits the first chapter and that gets the first page but the second chapter gets the odd page instead of the first page. I even tried an xsl:for-each to cycle through each of the chapters but that did not seem to work either. <fo:layout-master-set> <fo:simple-page-master master-name="first-page" xsl:use-attribute-sets="pageDimensions"> <fo:region-body margin-top="0pt" /> <fo:region-before region-name="first-before" extent="32pt" /> <fo:region-start extent="93pt" /> </fo:simple-page-master> <fo:simple-page-master master-name="odd-page" xsl:use-attribute-sets="pageDimensions"> <fo:region-body margin-top="71.5pt" /> <fo:region-before region-name="odd-before" extent="45pt" /> <fo:region-start extent="93pt" /> </fo:simple-page-master> <fo:simple-page-master master-name="even-page" xsl:use-attribute-sets="pageDimensions"> <fo:region-body margin-top="71.5pt" /> <fo:region-before region-name="even-before" extent="45pt" /> <fo:region-start extent="93pt" /> </fo:simple-page-master> <fo:page-sequence-master master-name="my-sequence"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference page-position="first" master-reference="first-page" page-postion="first"/> <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-page"/> <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-page"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> <fo:page-sequence master-reference="my-sequence"> <fo:static-content flow-name="first-before"> <fo:block xsl:use-attribute-sets="runningHeadPageNumber" text-align="right"><fo:page-number/></fo:block> </fo:static-content> <!-- This code sets up running head for odd pages --> <fo:static-content flow-name="odd-before"> <fo:block xsl:use-attribute-sets="runningHeadText" text-align="right"> <fo:retrieve-marker retrieve-class-name="section" retrieve-position="last-ending-within-page" retrieve-boundary="document"/> <fo:leader leader-pattern="space" leader-length="1em"/> <fo:inline xsl:use-attribute-sets="runningHeadPageNumber"><fo:page-number/></fo:inline> </fo:block> </fo:static-content> <!-- This code sets up running head for even pages --> <fo:static-content flow-name="even-before"> <fo:block xsl:use-attribute-sets="runningHeadText" start-indent="-93pt" keep-together.within-line="always" text-align="left"> <fo:inline xsl:use-attribute-sets="runningHeadPageNumber"><fo:page-number/></fo:inline> <fo:leader leader-pattern="space" leader-length="12pt"/> <fo:retrieve-marker retrieve-class-name="chapterTitle" retrieve-position="last-ending-within-page" retrieve-boundary="document"/> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <xsl:apply-templates select="/book/body"/> </fo:flow> </fo:page-sequence> Any suggestions are greatly appreciated on how to get each new chapter to start back on the first page's model without starting the page numbering back to 1. Thanks, Cindy Hunt
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xslt parameters used in custo, Mihai Bucica | Thread | Re: [xsl] XSL-FO page layout questi, Wendell Piez |
RE: [xsl] Xpath 1.0 Question : Excl, Simon Shutter | Date | RE: [xsl] Convert to RFC822 via XSL, Austin, Darrel |
Month |