aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/StudioIntegration
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2013-05-18 12:07:54 +0200
committerDean Camera <dean@fourwalledcubicle.com>2013-05-18 12:07:54 +0200
commitf6d0cdb817b3d6c52fad6531882bf6dcab0fd4a6 (patch)
tree7e143ec5f5a9faf91720212b0efad4d459ab08ef /LUFA/StudioIntegration
parent9891bf7cc3cac1b8cd97d7baa7cd20b6281ec2d8 (diff)
downloadlufa-f6d0cdb817b3d6c52fad6531882bf6dcab0fd4a6.tar.gz
lufa-f6d0cdb817b3d6c52fad6531882bf6dcab0fd4a6.tar.bz2
lufa-f6d0cdb817b3d6c52fad6531882bf6dcab0fd4a6.zip
Simplify LUFA Doxygen to Docbook transform, use parameterized page compounddef template.
Diffstat (limited to 'LUFA/StudioIntegration')
-rw-r--r--LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt52
1 files changed, 17 insertions, 35 deletions
diff --git a/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt b/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt
index bdbb32187..5885d9afe 100644
--- a/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt
+++ b/LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt
@@ -60,53 +60,35 @@
</title>
<!-- Add index chapter -->
- <xsl:call-template name="generate.top.level.page">
- <xsl:with-param name="top.level.page" select="compounddef[@kind = 'page' and @id = 'indexpage']"/>
- <xsl:with-param name="top.level.page.title" select="'Library Information'"/>
- </xsl:call-template>
+ <xsl:apply-templates select="compounddef[@kind = 'page' and @id = 'indexpage']">
+ <xsl:with-param name="element.type" select="'chapter'"/>
+ <xsl:with-param name="page.title" select="'Library Information'"/>
+ </xsl:apply-templates>
<!-- Add free-floating chapters -->
- <xsl:for-each select="compounddef[@kind = 'page' and not(@id = 'indexpage')]">
- <xsl:if test="not(//innerpage/@refid = current()/@id)">
- <xsl:call-template name="generate.top.level.page">
- <xsl:with-param name="top.level.page" select="current()"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
+ <xsl:apply-templates select="compounddef[@kind = 'page' and not(@id = 'indexpage') and not(//innerpage/@refid = @id)]">
+ <xsl:with-param name="element.type" select="'chapter'"/>
+ </xsl:apply-templates>
<!-- Add Modules 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>
+ <xsl:apply-templates select="compounddef[@kind = 'group' and not(//innergroup/@refid = @id)]"/>
</chapter>
</book>
</xsl:template>
- <xsl:template name="generate.top.level.page">
- <xsl:param name="top.level.page"/>
- <xsl:param name="top.level.page.title" select="$top.level.page/title"/>
-
- <chapter id="{$top.level.page/@id}">
- <title>
- <xsl:value-of select="$top.level.page.title"/>
- </title>
-
- <xsl:apply-templates select="$top.level.page/detaileddescription"/>
+ <xsl:template match="compounddef[@kind = 'page']">
+ <xsl:param name="element.type" select="'section'"/>
+ <xsl:param name="page.title" select="title"/>
- <xsl:for-each select="$top.level.page/innerpage">
- <xsl:apply-templates select="ancestor::*/compounddef[@kind = 'page' and @id = current()/@refid]"/>
- </xsl:for-each>
- </chapter>
- </xsl:template>
+ <xsl:element name="{$element.type}">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
- <xsl:template match="compounddef[@kind = 'page']">
- <section id="{@id}">
<title>
- <xsl:value-of select="title"/>
+ <xsl:value-of select="$page.title"/>
</title>
<xsl:apply-templates select="detaileddescription"/>
@@ -114,7 +96,7 @@
<xsl:for-each select="innerpage">
<xsl:apply-templates select="ancestor::*/compounddef[@kind = 'page' and @id = current()/@refid]"/>
</xsl:for-each>
- </section>
+ </xsl:element>
</xsl:template>
<xsl:template match="compounddef[@kind = 'group']">