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: special title rendering for a special section


Hi,
I have a special section type <section role="Example">. I want the title for these sections to be numbered within a chapter (even though other sections are not numbered).  So for example:
Example 1.1:  An Introduction
Example 1.2 : More Details
... etc., etc., ...
Example 29.3: How to Analyze a Mule

I manage to get that to work by changing the 'title.markup' mode for matching sections, but now on my toc page I'm getting:
1.1 Example 1.1: An Introduction

The label.markup template is getting called (my guess) twice to make the toc title
<!--  Modify section headings for Examples.
     Step 1: Set numbering for examples to Chapter.Example"
-->
<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>

<!-- Modify section headings for Examples.
     Step 2: Add "Example: " after the numb er  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>

Is there a way to modify the section title without messing up the toc?

thanks,
--Tim




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