[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] remove last section punctation
Mauritz, The pros may have a better suggestion, but in the meantime, I solved this problem by overriding the section object.title.template in my customization layer. The SAE Standards body has a convention that there can only be a trailing dot for level 1, and no trailing dot elsewhere. Here's what I use: <xsl:template match="section" mode="object.title.template"> <xsl:text>%n</xsl:text> <xsl:if test="parent::article"> <!-- trailing dot only for top level sections --> <xsl:text>.</xsl:text> </xsl:if> <xsl:text> %t</xsl:text> </xsl:template> If you left out the <xsl:if test="parent::article">...</xsl:if> I think it would do what you wanted and never add a trailing dot anywhere. I also have to be consistent in the TOC, so I make SAE happy, and keep to the trailing dot convention with the following: <!-- Override template in autotoc.xsl to get SAE toc.line format --> <xsl:template name="toc.line.prefix"> <xsl:param name="label" select="''"/> <xsl:choose> <xsl:when test="name()='section' and ancestor::appendix"> <xsl:text>APPENDIX</xsl:text> </xsl:when> <xsl:when test="name()='appendix'"> <xsl:text>APPENDIX</xsl:text> </xsl:when> <xsl:when test="name()='figure'"> <xsl:text>FIGURE</xsl:text> </xsl:when> <xsl:when test="name()='table'"> <xsl:text>TABLE</xsl:text> </xsl:when> </xsl:choose> <xsl:text> </xsl:text> <xsl:if test="$label != ''"> <xsl:copy-of select="$label"/> </xsl:if> <xsl:if test="parent::article"> <!-- trailing dot only for top level sections --> <xsl:text>.</xsl:text> </xsl:if> </xsl:template> Jim -----Original Message----- From: Mauritz Jeanson [mailto:mj@johanneberg.com] Sent: Wednesday, July 11, 2007 8:37 AM To: leeloo5e79-docbook@yahoo.de; docbook-apps@lists.oasis-open.org Subject: RE: [docbook-apps] remove last section punctation > -----Original Message----- > From: leeloo5e79-docbook@yahoo.de > I set > <xsl:param name="section.autolabel" select="1"/> > to have section numbering. But the numbers are like 1. or > 2.1. or 4.3.2. > I want to remove the last "." after the last number of the section. See this message: http://lists.oasis-open.org/archives/docbook-apps/200405/msg00062.html /MJ --------------------------------------------------------------------- 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]