Re: How to keep pagenumber over several page-sequences
Michael Niemann wrote: hello, I've split up my document into several page-sequences for better performance. xsl:for-each select=documentContent/chapter fo:page-sequence master-reference=ContentPageMaster initial-page-number=1 force-page-count=no-force fo:static-content flow-name=xsl-region-after fo:blockfo:page-number //fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block font-size=24 font-weight=bold border-bottom=solid black 1px id={generate-id()} margin-bottom=20pxxsl:value-of select=@page //fo:block fo:blockxsl:apply-templates //fo:block /fo:flow /fo:page-sequence /xsl:for-each /fo:root /xsl:template As you can easily see each chapter now starts with page 1. Is it possible to pass the pagenumber between those sequences without losing all the performance gain I got from spolitting up the chapter into sequences? Don't set initial-page-number=1 on any page-sequence except the first. To do this you will need to introduce an xsl:if. Try something like the following (caveat: completely untested and provided with no warranty!) xsl:for-each select=documentContent/chapter fo:page-sequence master-reference=ContentPageMaster force-page-count=no-force xsl:if test=position()==1 xsl:attribute name=initial-page-number1/xsl:attribute /xsl:if fo:static-content flow-name=xsl-region-after fo:blockfo:page-number //fo:block etc Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to keep pagenumber over several page-sequences
That makes sense. By removing the initial pagenumber for the chapter block the count starts with the index page though. How can I make it start with 1 without setting it in the block? Puppala, Kumar (LNG-CON) [EMAIL PROTECTED] wrote:v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Having just the force-page-count property on the subsequent page sequences should do the trick. fo:page-sequence master-reference=ContentPageMaster force-page-count=no-force The page number on subsequent page sequences is a continuation from the previous page sequence in this case. - - Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.
RE: How to keep pagenumber over several page-sequences
Let me try to understand your requirement. You have the following page-sequences in your document Page sequence for Index Page sequence for Chapter1 Page sequence for Chapter2 ... And you want the page number to start off from 1 on Chapter 1 instead of Index. If this is what you want, you can set initial-page-number on the page sequence for Chapter1 to 1 and then not mention this attribute on the remaining page-sequences. Regarding page sequence for Index, you mention the initial-page-number to 1 as well. The page number gets reset whenever you mention the initial-page-number property on a particular sequence. Hope this helps. From: Michael Niemann [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 14, 2007 4:09 AM To: fop-users@xmlgraphics.apache.org Subject: RE: How to keep pagenumber over several page-sequences That makes sense. By removing the initial pagenumber for the chapter block the count starts with the index page though. How can I make it start with 1 without setting it in the block? Puppala, Kumar (LNG-CON) [EMAIL PROTECTED] wrote: Having just the force-page-count property on the subsequent page sequences should do the trick. fo:page-sequence master-reference=ContentPageMaster force-page-count=no-force The page number on subsequent page sequences is a continuation from the previous page sequence in this case. Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. http://us.rd.yahoo.com/evt=51732/*http:/overview.mail.yahoo.com/
RE: How to keep pagenumber over several page-sequences
thanks. chris already posted the solution to my noobish problem. the chapters are generated through the same sequence template so I just had to insert the initial value during the first iteration. Puppala, Kumar (LNG-CON) wrote: Let me try to understand your requirement. You have the following page-sequences in your document Page sequence for Index Page sequence for Chapter1 Page sequence for Chapter2 ... And you want the page number to start off from 1 on Chapter 1 instead of Index. If this is what you want, you can set initial-page-number on the page sequence for Chapter1 to 1 and then not mention this attribute on the remaining page-sequences. Regarding page sequence for Index, you mention the initial-page-number to 1 as well. The page number gets reset whenever you mention the initial-page-number property on a particular sequence. Hope this helps. From: Michael Niemann [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 14, 2007 4:09 AM To: fop-users@xmlgraphics.apache.org Subject: RE: How to keep pagenumber over several page-sequences That makes sense. By removing the initial pagenumber for the chapter block the count starts with the index page though. How can I make it start with 1 without setting it in the block? Puppala, Kumar (LNG-CON) [EMAIL PROTECTED] wrote: Having just the force-page-count property on the subsequent page sequences should do the trick. fo:page-sequence master-reference=ContentPageMaster force-page-count=no-force The page number on subsequent page sequences is a continuation from the previous page sequence in this case. Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. http://us.rd.yahoo.com/evt=51732/*http:/overview.mail.yahoo.com/ -- View this message in context: http://www.nabble.com/How-to-keep-pagenumber-over-several-page-sequences-tf4799039.html#a13748535 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to keep pagenumber over several page-sequences
Having just the force-page-count property on the subsequent page sequences should do the trick. fo:page-sequence master-reference=ContentPageMaster force-page-count=no-force The page number on subsequent page sequences is a continuation from the previous page sequence in this case. From: Michael Niemann [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 13, 2007 10:45 AM To: fop-users@xmlgraphics.apache.org Subject: How to keep pagenumber over several page-sequences hello, I've split up my document into several page-sequences for better performance. xsl:for-each select=documentContent/chapter fo:page-sequence master-reference=ContentPageMaster initial-page-number=1 force-page-count=no-force fo:static-content flow-name=xsl-region-after fo:blockfo:page-number //fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block font-size=24 font-weight=bold border-bottom=solid black 1px id={generate-id()} margin-bottom=20pxxsl:value-of select=@page //fo:block fo:blockxsl:apply-templates //fo:block /fo:flow /fo:page-sequence /xsl:for-each /fo:root /xsl:template As you can easily see each chapter now starts with page 1. Is it possible to pass the pagenumber between those sequences without losing all the performance gain I got from spolitting up the chapter into sequences? best regards michael Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://us.rd.yahoo.com/evt=51443/*http:/www.yahoo.com/r/hs