OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] page numbering...


As pointed out by someone on this list I use the following :-

Somewhere in the customization layer

<!-- Define a processing instruction to reference the last page in a 
This is used in the footer to display the total number of pages.
<xsl:template match="processing-instruction()[local-name()='lastpage']">
<fo:block id="lastpage"/>

and in the footer customization

<xsl:when test="$double.sided = 0 and $position='center'">
<fo:page-number-citation ref-id="lastpage"/>

and just before the last element in the source enter the following 
processing instruction.


I also have the following in my fo customization which you may find useful

<!-- Define a processing instruction to force a new page -->
<xsl:template match="processing-instruction()[local-name()='pagebreak']">
<fo:block break-before ='page'/>

<!-- Define a processing instruction to force a new line.
<xsl:template match="processing-instruction()[local-name()='br']">

The last 2 I also use my xhtml customization to add an <hr/> and a <br/> 

Hope this helps.

Simon Kennedy

David White wrote:

> Hello all!
> More beginner questions, I’m try to add page numbering to the bottom 
> of my book using XSLT.
> The format is “ xx of yy “ xx being the current page (which I have 
> working), yy being the total pages of the book (which isnt working).
> My current XSLT snippet is:
> <fo:inline>
> <fo:page-number/><xsl:call-template name="gentext.space"/>
> <xsl:text> / </xsl:text>
> <xsl:call-template name="gentext.space"/>
> <!—the below line was a test, it doesn’t produce the total book pages à
> <fo:page-number-citation ref-id="terminator"/>
> </fo:inline>
> Any suggestions?
> Thanks

To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]