[mm-common] Create Devhelp chapters only for existing content
- From: Daniel Elstner <daniel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mm-common] Create Devhelp chapters only for existing content
- Date: Thu, 3 Sep 2009 16:51:10 +0000 (UTC)
commit cb406024b3a8269bfb5e931db36162552469abd9
Author: Daniel Elstner <danielk openismus com>
Date: Thu Sep 3 18:25:11 2009 +0200
Create Devhelp chapters only for existing content
* util/tagfile-to-devhelp2.xsl (chapters): Output the <sub> elements
only if they will have at least one child node. This way, there will
be no broken chapter link in the Devhelp documentation if the module
does not define any Doxygen groups, for instance.
util/tagfile-to-devhelp2.xsl | 29 +++++++++++++++++++++++------
1 files changed, 23 insertions(+), 6 deletions(-)
---
diff --git a/util/tagfile-to-devhelp2.xsl b/util/tagfile-to-devhelp2.xsl
index f534074..f834051 100644
--- a/util/tagfile-to-devhelp2.xsl
+++ b/util/tagfile-to-devhelp2.xsl
@@ -29,21 +29,38 @@
<book title="{$book_title}" name="{$book_name}" base="{$book_base}"
link="index.html" version="2" language="c++">
<chapters>
- <sub name="Modules" link="modules.html">
+ <xsl:variable name="modules">
<xsl:apply-templates select="tagfile/compound[ kind='group']" mode="module">
<xsl:sort lang="en" select="title"/>
</xsl:apply-templates>
- </sub>
- <sub name="Namespaces" link="namespaces.html">
+ </xsl:variable>
+ <xsl:if test="$modules">
+ <sub name="Modules" link="modules.html">
+ <xsl:copy-of select="$modules"/>
+ </sub>
+ </xsl:if>
+
+ <xsl:variable name="namespaces">
<xsl:apply-templates select="tagfile/compound[ kind='namespace']" mode="sub">
<xsl:sort lang="en" case-order="upper-first" select="name"/>
</xsl:apply-templates>
- </sub>
- <sub name="Classes" link="classes.html">
+ </xsl:variable>
+ <xsl:if test="$namespaces">
+ <sub name="Namespaces" link="namespaces.html">
+ <xsl:copy-of select="$namespaces"/>
+ </sub>
+ </xsl:if>
+
+ <xsl:variable name="classes">
<xsl:apply-templates select="tagfile/compound[ kind='class' or @kind='struct']" mode="sub">
<xsl:sort lang="en" case-order="upper-first" select="name"/>
</xsl:apply-templates>
- </sub>
+ </xsl:variable>
+ <xsl:if test="$classes">
+ <sub name="Classes" link="classes.html">
+ <xsl:copy-of select="$classes"/>
+ </sub>
+ </xsl:if>
</chapters>
<functions>
<xsl:apply-templates select="tagfile/compound" mode="compound">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]