Try to support inbodydescription in doxygen xml.

[SVN r51680]
This commit is contained in:
Daniel James 2009-03-10 08:09:14 +00:00
parent 5220fa791b
commit 03983168fc

View File

@ -51,7 +51,7 @@
<xsl:key name="compounds-by-id" match="compounddef" use="@id"/> <xsl:key name="compounds-by-id" match="compounddef" use="@id"/>
<xsl:key name="members-by-id" match="memberdef" use="@id" /> <xsl:key name="members-by-id" match="memberdef" use="@id" />
<xsl:strip-space elements="briefdescription detaileddescription"/> <xsl:strip-space elements="briefdescription detaileddescription inbodydescription"/>
<xsl:template name="kind-error-message"> <xsl:template name="kind-error-message">
<xsl:param name="message"/> <xsl:param name="message"/>
@ -118,6 +118,7 @@
tell us what is \internal and what isn't. --> tell us what is \internal and what isn't. -->
<xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/> <xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/>
<xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/> <xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/>
<xsl:when test="contains(inbodydescription/para, 'INTERNAL ONLY')"/>
<xsl:when test="@kind='file'"> <xsl:when test="@kind='file'">
<xsl:call-template name="file"/> <xsl:call-template name="file"/>
@ -259,6 +260,7 @@
<xsl:apply-templates select="briefdescription" mode="passthrough"/> <xsl:apply-templates select="briefdescription" mode="passthrough"/>
<xsl:apply-templates select="detaileddescription" mode="passthrough"/> <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:element> </xsl:element>
</xsl:if> </xsl:if>
@ -284,6 +286,7 @@
<xsl:apply-templates select="briefdescription" mode="passthrough"/> <xsl:apply-templates select="briefdescription" mode="passthrough"/>
<xsl:apply-templates select="detaileddescription" mode="passthrough"/> <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
</enum> </enum>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
@ -302,6 +305,7 @@
<xsl:apply-templates select="briefdescription" mode="passthrough"/> <xsl:apply-templates select="briefdescription" mode="passthrough"/>
<xsl:apply-templates select="detaileddescription" mode="passthrough"/> <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
</enumvalue> </enumvalue>
</xsl:template> </xsl:template>
@ -360,9 +364,10 @@
</xsl:call-template> </xsl:call-template>
</xsl:attribute> </xsl:attribute>
<xsl:if test="briefdescription/*|detaileddescription/*"> <xsl:if test="briefdescription/*|detaileddescription/*|inbodydescription/*">
<xsl:apply-templates select="briefdescription/*" mode="passthrough"/> <xsl:apply-templates select="briefdescription/*" mode="passthrough"/>
<xsl:apply-templates select="detaileddescription/*" mode="passthrough"/> <xsl:apply-templates select="detaileddescription/*" mode="passthrough"/>
<xsl:apply-templates select="inbdoydescription/*" mode="passthrough"/>
</xsl:if> </xsl:if>
<xsl:apply-templates mode="toplevel"> <xsl:apply-templates mode="toplevel">
@ -453,6 +458,7 @@
tell us what is \internal and what isn't. --> tell us what is \internal and what isn't. -->
<xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/> <xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/>
<xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/> <xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/>
<xsl:when test="contains(inbodydescription/para, 'INTERNAL ONLY')"/>
<xsl:when test="@kind='define'"> <xsl:when test="@kind='define'">
<macro> <macro>
@ -476,6 +482,7 @@
<xsl:apply-templates select="briefdescription" mode="passthrough"/> <xsl:apply-templates select="briefdescription" mode="passthrough"/>
<xsl:apply-templates select="detaileddescription" mode="passthrough"/> <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
</macro> </macro>
</xsl:when> </xsl:when>
@ -749,6 +756,7 @@
tell us what is \internal and what isn't. --> tell us what is \internal and what isn't. -->
<xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/> <xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/>
<xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/> <xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/>
<xsl:when test="contains(inbodydescription/para, 'INTERNAL ONLY')"/>
<xsl:when test="@kind='typedef'"> <xsl:when test="@kind='typedef'">
<xsl:call-template name="typedef"> <xsl:call-template name="typedef">
@ -836,6 +844,7 @@
<xsl:apply-templates select="briefdescription" mode="passthrough"/> <xsl:apply-templates select="briefdescription" mode="passthrough"/>
<xsl:apply-templates select="detaileddescription" mode="passthrough"/> <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
<type><xsl:apply-templates select="type"/></type> <type><xsl:apply-templates select="type"/></type>
</typedef> </typedef>
@ -874,7 +883,7 @@
<xsl:value-of select="normalize-space(declname/text())"/> <xsl:value-of select="normalize-space(declname/text())"/>
</xsl:variable> </xsl:variable>
<xsl:apply-templates select="../detaileddescription//parameterlist[attribute::kind='param']/*" <xsl:apply-templates select="../*[self::detaileddescription or self::inbodydescription]//parameterlist[attribute::kind='param']/*"
mode="parameter.description"> mode="parameter.description">
<xsl:with-param name="name"> <xsl:with-param name="name">
<xsl:value-of select="$name"/> <xsl:value-of select="$name"/>
@ -924,24 +933,25 @@
<!-- The description --> <!-- The description -->
<xsl:apply-templates select="briefdescription" mode="passthrough"/> <xsl:apply-templates select="briefdescription" mode="passthrough"/>
<xsl:apply-templates select="detaileddescription" mode="passthrough"/> <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
<xsl:apply-templates <xsl:apply-templates
select="detaileddescription/para/simplesect[@kind='pre']" select="*[self::detaileddescription or self::inbodydescription]/para/simplesect[@kind='pre']"
mode="function-clauses"/> mode="function-clauses"/>
<xsl:apply-templates <xsl:apply-templates
select="detaileddescription/para/simplesect[@kind='post']" select="*[self::detaileddescription or self::inbodydescription]/para/simplesect[@kind='post']"
mode="function-clauses"/> mode="function-clauses"/>
<xsl:apply-templates <xsl:apply-templates
select="detaileddescription/para/simplesect[@kind='return']" select="*[self::detaileddescription or self::inbodydescription]/para/simplesect[@kind='return']"
mode="function-clauses"/> mode="function-clauses"/>
<xsl:if test="detaileddescription/para/parameterlist[@kind='exception']"> <xsl:if test="*[self::detaileddescription or self::inbodydescription]/para/parameterlist[@kind='exception']">
<throws> <throws>
<xsl:apply-templates <xsl:apply-templates
select="detaileddescription/para/parameterlist[@kind='exception']" select="*[self::detaileddescription or self::inbodydescription]/para/parameterlist[@kind='exception']"
mode="function-clauses"/> mode="function-clauses"/>
</throws> </throws>
</xsl:if> </xsl:if>
<xsl:variable name="notes" select="detaileddescription/para/simplesect[@kind='note' or @kind='attention']"/> <xsl:variable name="notes" select="*[self::detaileddescription or self::inbodydescription]/para/simplesect[@kind='note' or @kind='attention']"/>
<xsl:if test="count($notes) &gt; 0"> <xsl:if test="count($notes) &gt; 0">
<notes> <notes>
<xsl:apply-templates select="$notes" mode="function-clauses"/> <xsl:apply-templates select="$notes" mode="function-clauses"/>
@ -1151,6 +1161,7 @@
<xsl:apply-templates select="briefdescription" mode="passthrough"/> <xsl:apply-templates select="briefdescription" mode="passthrough"/>
<xsl:apply-templates select="detaileddescription" mode="passthrough"/> <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/>
</data-member> </data-member>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
@ -1213,6 +1224,14 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="inbodydescription" mode="passthrough">
<xsl:if test="text()|*">
<description>
<xsl:apply-templates mode="passthrough"/>
</description>
</xsl:if>
</xsl:template>
<!-- Handle function clauses --> <!-- Handle function clauses -->
<xsl:template match="simplesect" mode="function-clauses"> <xsl:template match="simplesect" mode="function-clauses">
<xsl:if test="@kind='pre'"> <xsl:if test="@kind='pre'">