diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-04-21 15:15:47 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-04-21 15:15:47 +0000 |
commit | 9136fe2132dd3ce6d61fe505cfff6178630fed92 (patch) | |
tree | 0f239037fb9f9b470d9d9e38ec5bbeeec9a7a7ea | |
parent | d540e525050a48311bf3308878940766797989a8 (diff) | |
download | lufa-9136fe2132dd3ce6d61fe505cfff6178630fed92.tar.gz lufa-9136fe2132dd3ce6d61fe505cfff6178630fed92.tar.bz2 lufa-9136fe2132dd3ce6d61fe505cfff6178630fed92.zip |
Finish initial Doxygen-to-Docbook transform.
-rw-r--r-- | LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl | 145 | ||||
-rw-r--r-- | LUFA/StudioIntegration/makefile | 2 |
2 files changed, 146 insertions, 1 deletions
diff --git a/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl b/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl index 0da97ca23..53dd82f9a 100644 --- a/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl +++ b/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl @@ -38,10 +38,12 @@ <xsl:value-of select="$book.title"/> </title> + <!-- Add index chapter --> <xsl:call-template name="generate.top.level.page"> <xsl:with-param name="top.level.page" select="compounddef[@kind = 'page' and contains(@id, 'index')]"/> </xsl:call-template> + <!-- Add free-floating chapters --> <xsl:for-each select="compounddef[@kind = 'page' and not(contains(@id, 'index'))]"> <xsl:if test="not(//innerpage[@refid = current()/@id])"> <xsl:call-template name="generate.top.level.page"> @@ -49,6 +51,16 @@ </xsl:call-template> </xsl:if> </xsl:for-each> + + <!-- Add Module chapter --> + <chapter> + <title>Modules</title> + <xsl:for-each select="compounddef[@kind = 'group']"> + <xsl:if test="not(//innergroup[@refid = current()/@id])"> + <xsl:apply-templates select="current()"/> + </xsl:if> + </xsl:for-each> + </chapter> </book> </xsl:template> @@ -80,6 +92,139 @@ </section> </xsl:template> + <xsl:template match="compounddef[@kind = 'group']"> + <section id="{@id}"> + <title> + <xsl:value-of select="title"/> + </title> + + <xsl:variable name="book.title"> + <xsl:call-template name="generate.book.title"/> + </xsl:variable> + + <xsl:variable name="name"> + <xsl:choose> + <xsl:when test="contains(compoundname, '_')"> + <xsl:value-of select="translate(compoundname, '_', '/')"/> + <xsl:text>.h</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="compoundname"/> + <xsl:text>.h</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="name.escaped"> + <xsl:choose> + <xsl:when test="contains(compoundname, '_')"> + <xsl:value-of select="translate(compoundname, '_', '.')"/> + <xsl:text>.h</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="compoundname"/> + <xsl:text>.h</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <indexterm id="{$keyword.namespace}.{$name.escaped}"> + <primary>Header</primary> + <secondary> + <xsl:value-of select="$name"/> + </secondary> + </indexterm> + <indexterm> + <primary> + <xsl:value-of select="$book.title"/> + </primary> + <secondary> + <xsl:value-of select="$name"/> + </secondary> + </indexterm> + <indexterm> + <primary> + <xsl:value-of select="$name"/> + </primary> + </indexterm> + + <xsl:apply-templates/> + <xsl:for-each select="innerclass"> + <xsl:apply-templates select="ancestor::*/compounddef[@id = current()/@refid]"/> + </xsl:for-each> + + <xsl:for-each select="innergroup"> + <xsl:apply-templates select="ancestor::*/compounddef[@kind = 'group' and @id = current()/@refid]"/> + </xsl:for-each> + </section> + </xsl:template> + + <xsl:template match="compounddef[@kind = 'struct' or @kind = 'union']"> + <xsl:variable name="name" select="compoundname"/> + <xsl:variable name="book.title"> + <xsl:call-template name="generate.book.title"/> + </xsl:variable> + <xsl:variable name="book.id"> + <xsl:call-template name="generate.book.id"> + <xsl:with-param name="book.title" select="$book.title"/> + </xsl:call-template> + </xsl:variable> + + <section id="{@id}" xreflabel="{$name}"> + <title> + <xsl:value-of select="@kind"/> + <xsl:text> </xsl:text> + <xsl:value-of select="$name"/> + </title> + + <indexterm id="{$keyword.namespace}.{$name}"> + <primary> + <xsl:value-of select="$book.title"/> + </primary> + <secondary> + <xsl:value-of select="$name"/> + </secondary> + </indexterm> + + <xsl:apply-templates select="detaileddescription"/> + <xsl:for-each select="sectiondef[@kind='public-attrib']"> + <table abstyle="striped"> + <title> + <xsl:value-of select="$name"/> + </title> + <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> + <row> + <entry>Data type</entry> + <entry>Field name</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <xsl:for-each select="memberdef"> + <row id="{@id}" xreflabel="{name}"> + <entry> + <xsl:apply-templates select="type"/> + </entry> + <entry> + <xsl:value-of select="name"/> + <indexterm id="{$keyword.namespace}.{$name}.{name}"/> + </entry> + <entry> + <xsl:apply-templates select="detaileddescription"/> + </entry> + </row> + </xsl:for-each> + </tbody> + </tgroup> + </table> + </xsl:for-each> + </section> + </xsl:template> + <xsl:template match="linebreak"> <xsl:text> </xsl:text> </xsl:template> diff --git a/LUFA/StudioIntegration/makefile b/LUFA/StudioIntegration/makefile index daaa2dccd..975dd04fc 100644 --- a/LUFA/StudioIntegration/makefile +++ b/LUFA/StudioIntegration/makefile @@ -42,7 +42,7 @@ VSIX_ASSETS := $(LUFA_ROOT)/DoxygenPages/Images/LUFA_thumb.png \ Blob/LUFA.pkgdef MSHELP_GEN_PARAMS := --stringparam generate.toc "book toc" \ --stringparam chunk.quietly "1" \ - --stringparam chunk.section.depth "2" \ + --stringparam chunk.section.depth "3" \ --stringparam chunk.first.sections "1" all: generate_xml check_filenames generate_vsix |