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] Outline numbering for HTML output

Thanks, Bob. That was helpful. Here’s the customized template I created:


       <!-- ==================================================================== -->

       <!--  Custom numbering of sections (adapted from common/labels.xsl).      -->

       <xsl:template match="d:section" mode="label.markup">


              <xsl:variable name="level">

                     <xsl:call-template name="section.level"/>



              <!-- does this section get labelled? -->

              <xsl:variable name="label">

                     <xsl:call-template name="label.this.section">

                           <xsl:with-param name="section" select="."/>





                     <xsl:when test="@label">

                           <xsl:value-of select="@label"/>


                     <xsl:when test="$label != 0">


                                  <xsl:when test="$level = 1">

                                         <xsl:number format="I" count="d:section"/>


                                  <xsl:when test="$level = 2">

                                         <xsl:number format="A" count="d:section"/>


                                  <xsl:when test="$level = 3">

                                         <xsl:number format="1" count="d:section"/>



                                         <!-- nop -->











From: Bob Stayton [mailto:bobs@sagehill.net]
Sent: Thursday, July 25, 2013 9:26 AM
To: Jeff Powanda; docbook-apps
Cc: TechPubs
Subject: Re: [docbook-apps] Outline numbering for HTML output


Hi Jeff,

This would require a customization of this template:


<xsl:template match="section" mode="label.markup">


from common/labels.xsl to take into account the section level.  You can use the existing utility template named "section.level" that returns an integer value for the section level.


If you customize that template, then those numbers will be used everywhere, including the TOC and xrefs.


Bob Stayton
Sagehill Enterprises


From: Jeff Powanda

Sent: Thursday, July 25, 2013 9:11 AM

Cc: TechPubs

Subject: [docbook-apps] Outline numbering for HTML output


I’m trying to output HTML release notes using outline numbering for sections, using the following hierarchy:


I (uppercase Roman numerals)

                A (uppercase letters)

                                1 (numerals)

                                                a (lowercase letters)


This doesn’t seem possible using section.autolabel property, which lets you specify only one label value. Is there a simple out-of-the-box way to do this? Or do I need to implement custom section numbering in my customization layer?



Jeff Powanda
Staff Technical Writer
O: 408-882-5100
M: 831-252-2258



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