This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Page number in ToC
Nicolas,
In your solution, did you also remove the id="{$id}"
attribute from the fo:page-sequence? If not, don't you
get duplicate ID errors?
bobs
On Fri, Aug 09, 2002 at 11:14:23AM +0200, Nicolas Nieswandt wrote:
> Sorry, I had that problem, too. But I forgot to post the solution.
>
> That's because the referenced ID of chapter|prefarce|appendix|article is
> put into the <fo:page-sequence> element, and it seems that FOP only
> accepts IDs in <fo:block> for page number generation.
>
> You could change this by wrapping a <fo:block> around a
> <xsl:call-template> in fo/component.xsl, that's why it works with
> sections.
>
> Search for "chapter.titelpage" and change it according to the following
> example.
>
> <xsl:template match="preface">
> <..snip..>
> <fo:block id="{$id}">
> <xsl:call-template name="preface.titlepage"/>
> </fo:block>
> <..snip..>
> </xsl:template>
>
> <xsl:template match="chapter">
> <..snip..>
> <fo:block id="{$id}">
> <xsl:call-template name="chapter.titlepage"/>
> </fo:block>
> <..snip..>
> </xsl:template>
>
> <xsl:template match="appendix">
> <..snip..>
> <fo:block id="{$id}">
> <xsl:call-template name="appendix.titlepage"/>
> </fo:block>
> <..snip..>
> </xsl:template>
>
> <xsl:template match="article">
> <..snip..>
> <fo:block id="{$id}">
> <xsl:call-template name="article.titlepage"/>
> </fo:block>
> <..snip..>
> </xsl:template>
>
> > -----Original Message-----
> > From: Jens Stavnstrup [mailto:js@ddre.dk]
> > Sent: Friday, August 09, 2002 8:21 AM
> > To: Bob Stayton
> > Cc: Nicolas Nieswandt; docbook-apps@lists.oasis-open.org
> > Subject: Re: DOCBOOK-APPS: Page number in ToC
> >
> >
> > Great, this look much nicer. But, I am stille wondering, if
> > we shouldn't
> > let the use of this be optional, and still keeo Norm's old
> > style at least
> > for now. I still don't get at page number for each component
> > (chapter,
> > appendix etc.)
> >
> > Regards
> >
> > Jens
> >
> >
>
>
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
Caldera International, Inc. fax: (831) 429-1887
email: bobs@caldera.com