diff options
author | Daniel Elstner <danielk@openismus.com> | 2009-09-02 15:57:35 +0200 |
---|---|---|
committer | Daniel Elstner <danielk@openismus.com> | 2009-09-02 15:57:35 +0200 |
commit | 7debeccce8333148dd8845e7241c3a365dc640e6 (patch) | |
tree | 5014238ae13fb70e918ee3181966d6fccaacf5e6 /util | |
parent | 322df7b5109d1fcd039908fcde972041e415b8c2 (diff) | |
download | mm-common-7debeccce8333148dd8845e7241c3a365dc640e6.tar.gz |
Reduce duplicate logic in the Devhelp transform
* util/tagfile-to-devhelp2.xsl (functions): Apply the templates to all
<compound> elements, and add a catch-all template to filter anything
which did not match.
Diffstat (limited to 'util')
-rw-r--r-- | util/tagfile-to-devhelp2.xsl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/util/tagfile-to-devhelp2.xsl b/util/tagfile-to-devhelp2.xsl index f9cf129..f534074 100644 --- a/util/tagfile-to-devhelp2.xsl +++ b/util/tagfile-to-devhelp2.xsl @@ -46,8 +46,8 @@ </sub> </chapters> <functions> - <xsl:apply-templates select="tagfile/compound[@kind='namespace' or @kind='class' or @kind='struct']" mode="compound"> - <xsl:sort lang="en" select="name"/> + <xsl:apply-templates select="tagfile/compound" mode="compound"> + <xsl:sort lang="en" case-order="upper-first" select="name"/> </xsl:apply-templates> </functions> </book> @@ -63,15 +63,17 @@ <xsl:template match="compound[@kind='namespace']" mode="compound"> <xsl:apply-templates select="member" mode="keyword"> - <xsl:sort lang="en" select="name"/> + <xsl:sort lang="en" case-order="upper-first" select="name"/> </xsl:apply-templates> </xsl:template> <xsl:template match="compound[@kind='class' or @kind='struct']" mode="compound"> <keyword type="struct" name="{name}" link="{filename}"/> <xsl:apply-templates select="member" mode="keyword"> - <xsl:sort lang="en" select="name"/> + <xsl:sort lang="en" case-order="upper-first" select="name"/> </xsl:apply-templates> </xsl:template> + <!-- Ignore compounds of unknown type --> + <xsl:template match="*" mode="compound"/> <xsl:template match="member[@kind='function' or @kind='typedef']" mode="keyword"> <keyword type="{@kind}" xsl:use-attribute-sets="keyword-member"/> |