[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] mode question
That's because the template generating the TOC line first applies templates with mode="label.markup" and then again applies templates with mode="title.markup". Generally title.markup should generate just the title without a number. Use mode="object.title.markup" to generate the combined version. Regardless, you will need to customize the template named 'toc.line' in fo/autotoc.xsl to get the entry you want. Bob Stayton Sagehill Enterprises bobs@sagehill.net ----- Original Message ----- From: "Tim Arnold" <Tim.Arnold@sas.com> To: <docbook-apps@lists.oasis-open.org> Sent: Monday, June 14, 2010 10:55 AM Subject: [docbook-apps] mode question Hi, For certain sections in my document I use a customization to change the numbering (mode=label.markup) and the title (mode=title.markup). However, when the TOC is created it appears that the label.markup is getting called twice. That is, <section role="Example"> is rendered as "Example 13.1: Analysis" and in the TOC the number is repeated--the entry appears as "13.1. Example 13.1: Analysis" Can someone tell me what I'm doing wrong? thanks, --Tim The code: (1) change the numbering: <xsl:template match="d:section[attribute::role='Example']" mode="label.markup" priority="1"> <xsl:number level="multiple" format="1" count="d:chapter|d:section[attribute::role='Example']" /> </xsl:template> (2) Add "Example: " after the label and call original stylesheets <xsl:template match="d:section[attribute::role='Example']" mode="title.markup" priority="1"> <xsl:text>Example </xsl:text> <xsl:apply-templates select="." mode="label.markup" > <xsl:with-param name="allow-anchors" select="1"/> </xsl:apply-templates> <xsl:text>: </xsl:text> <xsl:apply-imports /> </xsl:template> --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]