Add check to the Doxygen->Docbook transform to warning on untemplated items. Add...
authorDean Camera <dean@fourwalledcubicle.com>
Sat, 4 May 2013 14:38:11 +0000 (14:38 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sat, 4 May 2013 14:38:11 +0000 (14:38 +0000)
LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt

index c21debe..18c3ea6 100644 (file)
                </chapter>
        </xsl:template>
 
-       <xsl:template match="compounddef">
-               <!-- Discard compounddef elements unless a later template matches -->
-       </xsl:template>
-
        <xsl:template match="compounddef[@kind = 'page']">
                <section id="{@id}">
                        <title>
        </xsl:template>
 
        <xsl:template match="memberdef[@kind = 'enum']">
-               <xsl:variable name="name" select="name"/>
-
                <section id="{@id}" xreflabel="{name}">
                        <title>
                                <xsl:text>Enum </xsl:text>
-                               <xsl:value-of select="$name"/>
+                               <xsl:value-of select="name"/>
                        </title>
 
                        <xsl:call-template name="generate.index.id">
-                               <xsl:with-param name="name" select="$name"/>
+                               <xsl:with-param name="name" select="name"/>
                        </xsl:call-template>
 
                        <xsl:apply-templates select="detaileddescription"/>
                                                                <entry>
                                                                        <para id="{@id}" xreflabel="{name}">
                                                                                <xsl:value-of select="name"/>
-                                                                               <indexterm id="{$keyword.namespace}.{$name}.{name}"/>
+                                                                               <indexterm id="{$keyword.namespace}.{name}"/>
                                                                        </para>
                                                                </entry>
                                                                <entry>
                </entry>
        </xsl:template>
 
-       <xsl:template match="type">
-               <xsl:apply-templates/>
-       </xsl:template>
-
-       <xsl:template match="para">
+       <xsl:template match="parameterdescription">
                <para>
                        <xsl:apply-templates/>
                </para>
        </xsl:template>
 
+       <xsl:template match="type">
+               <xsl:apply-templates/>
+       </xsl:template>
+
        <xsl:template match="bold">
                <emphasis role="bold">
                        <xsl:apply-templates/>
                <xsl:apply-templates/>
        </xsl:template>
 
-       <xsl:template match="computeroutput">
+       <xsl:template match="mdash | ndash">
+               <xsl:text>--</xsl:text>
+       </xsl:template>
+
+       <xsl:template match="computeroutput | preformatted">
                <computeroutput>
                        <xsl:apply-templates/>
                </computeroutput>
        </xsl:template>
 
+       <xsl:template match="codeline">
+                       <xsl:apply-templates/>
+       </xsl:template>
+
        <xsl:template match="ulink">
                <ulink url="{@url}">
                        <xsl:value-of select="."/>
                </subscript>
        </xsl:template>
 
+       <xsl:template match="para">
+               <para>
+                       <xsl:apply-templates/>
+               </para>
+       </xsl:template>
+
        <xsl:template match="ref">
                <xsl:choose>
                        <!-- Don't show links inside program listings -->
                </xsl:choose>
        </xsl:template>
 
+       <xsl:template match="entry">
+               <entry>
+                       <xsl:apply-templates/>
+               </entry>
+       </xsl:template>
+
        <xsl:template match="table">
                <xsl:choose>
                        <xsl:when test="caption">
                        <thead>
                                <xsl:for-each select="row[1]">
                                        <row>
-                                               <xsl:for-each select="entry">
-                                                       <entry>
-                                                               <xsl:apply-templates select="."/>
-                                                       </entry>
-                                               </xsl:for-each>
+                                               <xsl:apply-templates select="entry"/>
                                        </row>
                                </xsl:for-each>
                        </thead>
                        <tbody>
                                <xsl:for-each select="row[position() != 1]">
                                        <row>
-                                               <xsl:for-each select="entry">
-                                                       <entry>
-                                                               <xsl:apply-templates select="."/>
-                                                       </entry>
-                                               </xsl:for-each>
+                                               <xsl:apply-templates select="entry"/>
                                        </row>
                                </xsl:for-each>
                        </tbody>
 
        <xsl:template match="title"/>
 
+       <xsl:template match="*">
+               <xsl:message>NO XSL TEMPLATE MATCH: <xsl:value-of select="name()"/></xsl:message>
+       </xsl:template>
+
 </xsl:stylesheet>