diff options
author | Bill Spitzak <spitzak@gmail.com> | 2014-12-18 20:15:07 -0800 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-12-19 16:21:36 +0200 |
commit | f980a60038e06156d8462ed1c2881db456ad25c8 (patch) | |
tree | 6fab7390e7aa18b53df0cadae108e781927ad26a | |
parent | 4abe5edf46f1b1417394c3186e2056673bc358d3 (diff) | |
download | wayland-f980a60038e06156d8462ed1c2881db456ad25c8.tar.gz |
doc: Each class in doxygen output is a section
All the methods belonging to the class are listed with it, making
it much easier to find them.
I dumped all other functions into a section called "Functions" at
the end.
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | doc/publican/doxygen-to-publican.xsl | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/doc/publican/doxygen-to-publican.xsl b/doc/publican/doxygen-to-publican.xsl index 0ed7030..08a71e7 100644 --- a/doc/publican/doxygen-to-publican.xsl +++ b/doc/publican/doxygen-to-publican.xsl @@ -36,17 +36,16 @@ 'SC', 'sc')"/>. </para> - <xsl:if test="/doxygen/compounddef[@kind='class']"> + <xsl:apply-templates select="/doxygen/compounddef[@kind='class']" /> + + <section id="{$which}-Functions"> + <title>Functions</title> + <para /> <variablelist> - <xsl:apply-templates select="/doxygen/compounddef" /> + <xsl:apply-templates select="/doxygen/compounddef[@kind!='class']/sectiondef/memberdef" /> </variablelist> - </xsl:if> - - <para>Methods for the respective classes.</para> + </section> - <variablelist> - <xsl:apply-templates select="/doxygen/compounddef/sectiondef/memberdef" /> - </variablelist> </appendix> </xsl:template> @@ -104,6 +103,11 @@ <programlisting><xsl:apply-templates /></programlisting> </xsl:template> +<!-- stops cross-references in the section titles --> +<xsl:template match="briefdescription"> + <xsl:value-of select="." /> +</xsl:template> + <!-- this opens a para for each detaileddescription/para. I could not find a way to extract the right text for the description from the source otherwise. Downside: we can't use para for return value, "see @@ -143,18 +147,20 @@ <!-- classes --> <xsl:template match="compounddef" > <xsl:if test="@kind = 'class'"> - <varlistentry id="{$which}-{@id}"> - <term> + <section id="{$which}-{@id}"> + <title> <xsl:value-of select="compoundname" /> <xsl:if test="normalize-space(briefdescription) != ''"> - <xsl:apply-templates select="briefdescription" /> </xsl:if> - </term> + </title> - <listitem> - <xsl:apply-templates select="detaileddescription" /> - </listitem> - </varlistentry> + <xsl:apply-templates select="detaileddescription" /> + + <variablelist> + <xsl:apply-templates select="sectiondef/memberdef" /> + </variablelist> + </section> </xsl:if> </xsl:template> </xsl:stylesheet> |