aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/StudioIntegration
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2013-05-04 14:38:11 +0000
committerDean Camera <dean@fourwalledcubicle.com>2013-05-04 14:38:11 +0000
commitfd5e98d380820c01e1f4346cf7f11e573e1c5c75 (patch)
tree497d5052be41b17ba0f0827cab1d21945396c3a9 /LUFA/StudioIntegration
parentdb929fd4c8b7622f38f1a16abe088798e9e79f8c (diff)
downloadlufa-fd5e98d380820c01e1f4346cf7f11e573e1c5c75.tar.gz
lufa-fd5e98d380820c01e1f4346cf7f11e573e1c5c75.tar.bz2
lufa-fd5e98d380820c01e1f4346cf7f11e573e1c5c75.zip
Add check to the Doxygen->Docbook transform to warning on untemplated items. Add additional templates to ensure the output documentation does not have unescaped or unformatted entries.
Diffstat (limited to 'LUFA/StudioIntegration')
-rw-r--r--LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt60
1 files changed, 35 insertions, 25 deletions
diff --git a/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt b/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt
index c21debece..18c3ea65f 100644
--- a/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt
+++ b/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt
@@ -103,10 +103,6 @@
</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>
@@ -305,16 +301,14 @@
</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"/>
@@ -334,7 +328,7 @@
<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>
@@ -588,16 +582,16 @@
</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/>
@@ -614,12 +608,20 @@
<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="."/>
@@ -638,6 +640,12 @@
</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 -->
@@ -659,6 +667,12 @@
</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">
@@ -683,22 +697,14 @@
<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>
@@ -783,4 +789,8 @@
<xsl:template match="title"/>
+ <xsl:template match="*">
+ <xsl:message>NO XSL TEMPLATE MATCH: <xsl:value-of select="name()"/></xsl:message>
+ </xsl:template>
+
</xsl:stylesheet>