Docbkx-tools: section numbering

docbkx-tools logo Jamie mentioned yesterday that we were missing section numbering for the docs.

Chapters are numbered by default. Not so for sections. So we had something like the following.

Chapter 1. My First Chapter
My First Section
My First Subsection
My Second Subsection
My Second Section
Chapter 2. My Second Chapter
etc.

What we wanted was something more like the following.

Chapter 1. My First Chapter
1.1. My First Section
1.1.1. My First Subsection
1.1.2. My Second Subsection
1.2. My Second Section
Chapter 2. My Second Chapter
etc.

By setting two stylesheet parameters in the pom.xml global configuration section invoking the docbkx-tools plugin, you get the latter in the generated documents.

<sectionAutolabel>true</sectionAutolabel>
<sectionLabelIncludesComponentLabel>true</sectionLabelIncludesComponentLabel>

I learned the parameter names from the DocBook XSL Stylesheets: Reference Documentation, by the way. Just translate the DocBook stylesheet parameter names with dots, like section.label.includes.component.label, to camelCase names, like sectionLabelIncludesComponentLabel, for the docbkx-tools configuration elements.

For an example, see the pom.xml for OpenDJ.