Simplify the Doxygen to Docbook XML transform.

pull/1469/head
Dean Camera 12 years ago
parent 51bfd9c95c
commit 8474262728

@ -95,7 +95,7 @@
* is not used. * is not used.
* *
* \note When the \c HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, * \note When the \c HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined,
* this method is unavailable. * this field is unavailable.
*/ */
#endif #endif
} Config; /**< Config data for the USB class interface within the device. All elements in this section } Config; /**< Config data for the USB class interface within the device. All elements in this section

@ -166,10 +166,8 @@
<title> <title>
<xsl:value-of select="$name"/> <xsl:value-of select="$name"/>
</title> </title>
<tgroup cols="3"> <tgroup cols="3">
<colspec colnum="1" colname="start.col"/>
<colspec colnum="3" colname="stop.col"/>
<spanspec spanname="full" namest="start.col" nameend="stop.col"/>
<thead> <thead>
<row> <row>
<entry>Type</entry> <entry>Type</entry>
@ -177,6 +175,7 @@
<entry>Description</entry> <entry>Description</entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<xsl:for-each select="memberdef"> <xsl:for-each select="memberdef">
<row id="{@id}" xreflabel="{name}"> <row id="{@id}" xreflabel="{name}">
@ -286,6 +285,7 @@
<entry>Description</entry> <entry>Description</entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<xsl:for-each select="enumvalue"> <xsl:for-each select="enumvalue">
<row> <row>
@ -350,13 +350,8 @@
</section> </section>
</xsl:template> </xsl:template>
<xsl:template match="memberdef[@kind = 'variable' or @kind = 'typedef']"> <xsl:template match="memberdef[@kind = 'typedef']">
<section id="{@id}" xreflabel="{name}"> <section id="{@id}" xreflabel="{name}">
<!-- Doxygen gets confused and thinks function pointer type definitions
are variables, so we need to map them to this common section and
check the definition to see which of the two it is. -->
<xsl:choose>
<xsl:when test="contains(definition, 'typedef')">
<title> <title>
<xsl:text>Type </xsl:text> <xsl:text>Type </xsl:text>
<xsl:value-of select="name"/> <xsl:value-of select="name"/>
@ -376,9 +371,14 @@
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<xsl:value-of select="argsstring"/> <xsl:value-of select="argsstring"/>
</programlisting> </programlisting>
</xsl:when>
<xsl:otherwise> <xsl:apply-templates select="detaileddescription"/>
</section>
</xsl:template>
<xsl:template match="memberdef[@kind = 'variable']">
<section id="{@id}" xreflabel="{name}">
<title> <title>
<xsl:text>Variable </xsl:text> <xsl:text>Variable </xsl:text>
<xsl:value-of select="name"/> <xsl:value-of select="name"/>
@ -395,14 +395,13 @@
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<xsl:value-of select="name"/> <xsl:value-of select="name"/>
</programlisting> </programlisting>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="detaileddescription"/> <xsl:apply-templates select="detaileddescription"/>
</section> </section>
</xsl:template> </xsl:template>
<xsl:template match="linebreak | simplesectsep"> <xsl:template match="linebreak | simplesectsep">
<!-- MUST be on two separate lines, as this is a *literal* newline -->
<literallayout> <literallayout>
</literallayout> </literallayout>
</xsl:template> </xsl:template>
@ -576,6 +575,8 @@
</xsl:template> </xsl:template>
<xsl:template match="mdash | ndash"> <xsl:template match="mdash | ndash">
<!-- Doxygen bug; double dashed are replaced with single HTML dash
entities, even in verbatim-like <tt> sections -->
<xsl:text>--</xsl:text> <xsl:text>--</xsl:text>
</xsl:template> </xsl:template>
@ -669,6 +670,7 @@
</row> </row>
</xsl:for-each> </xsl:for-each>
</thead> </thead>
<tbody> <tbody>
<xsl:for-each select="row[position() != 1]"> <xsl:for-each select="row[position() != 1]">
<row> <row>

Loading…
Cancel
Save