Hi everyone,
I'm trying to add numbering to a xml document that is organized like a book. Numbering chapters and chapter sections/subsections is fairly obvious, but I also have appendices with sections and subsections. I want to be able to number it like A.1, A.1.1, A.2, etc., but the xslt doesn't seem to like combining the letter with the numbers. For example, here is what I'm trying:
Code:
<appendix>
<title>Appendix A Title</title>
<sect1>
<title>Section 1 Title</title>
<para>Some content.</para>
<sect2>
<title>Subsection 1 Title</title>
<para>Some more content.</para>
</sect2>
</sect1>
</appendix>
I would like this to be numbered like:
Appendix A Appendix A Title
A.1 Section 1 Title
A.1.1 Subsection 1 Title
The xsl:number code I'm using is this (this is all in a nested xsl:for-each to get the titles):
Code:
<xsl:text>Appendix </xsl:text><xsl:number format="A " level="multiple"/>
<xsl:number format="1 " level="multiple" count="appendix|sect1"/>
<xsl:number format="1 " level="multiple" count="appendix|sect1|sect2"/>
This will number the appendix title fine, but replaces the appendix letter with a number on the sect1 and sect2 elements. So it ends up looking like this:
Appendix A Appendix A Title
1.1 Section 1 Title
1.1.1 Subsection 1 Title
Any idea what I'm doing wrong? Any help would be appreciated.
Thanks,
Josh