doxygen/doxygen2boostbook.xsl: Don't strip <para> elements from within

(generated) <purpose> elements; just make them <simpara> elements.

annotation.xsl: Added a "purpose" mode that strips paragraph elements
for printing the purpose in a comment

function.xsl: Don't compact methods or overloaded methods.


[SVN r20499]
This commit is contained in:
Douglas Gregor 2003-10-27 01:13:34 +00:00
parent c1cdd4526f
commit 075fcc3cbd
3 changed files with 49 additions and 37 deletions

View File

@ -268,4 +268,18 @@
</xsl:apply-templates>
</xsl:element>
</xsl:template>
<!-- The "purpose" mode strips simpara/para elements so that we can
place the resulting text into a comment in the synopsis. -->
<xsl:template match="para|simpara" mode="purpose">
<xsl:apply-templates mode="annotation"/>
</xsl:template>
<xsl:template match="*" mode="purpose">
<xsl:apply-templates select="." mode="annotation"/>
</xsl:template>
<xsl:template match="text()" mode="purpose">
<xsl:apply-templates select="." mode="annotation"/>
</xsl:template>
</xsl:stylesheet>

View File

@ -1147,7 +1147,8 @@ Cannot handle memberdef element with kind=<xsl:value-of select="@kind"/>
<xsl:apply-templates select="." mode="passthrough"/>
</xsl:template>
<!-- Remove top-level "para" and elements in the purpose -->
<!-- Replace top-level "para" elements with "simpara" elements in
the purpose -->
<xsl:template match="*" mode="purpose">
<xsl:apply-templates mode="passthrough"/>
</xsl:template>
@ -1157,7 +1158,9 @@ Cannot handle memberdef element with kind=<xsl:value-of select="@kind"/>
</xsl:template>
<xsl:template match="para" mode="purpose">
<simpara>
<xsl:apply-templates select="*|text()" mode="passthrough"/>
</simpara>
</xsl:template>
</xsl:stylesheet>

View File

@ -468,7 +468,8 @@
<xsl:variable name="compact"
select="not (para|description|requires|effects|postconditions|returns|
throws|complexity|notes|rationale) and
($boost.compact.function='1')"/>
($boost.compact.function='1') and
not (local-name(.)='method')"/>
<xsl:choose>
<xsl:when test="$compact">
@ -484,7 +485,7 @@
<xsl:with-param name="text">
<xsl:text>// </xsl:text>
<xsl:apply-templates select="purpose/*|purpose/text()"
mode="annotation"/>
mode="purpose"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
@ -512,7 +513,8 @@
<xsl:variable name="compact"
select="not (para|description|requires|effects|postconditions|returns|
throws|complexity|notes|rationale) and
($boost.compact.function='1')"/>
($boost.compact.function='1') and
not (local-name(.)='overloaded-method')"/>
<xsl:choose>
<xsl:when test="$compact">
@ -898,7 +900,8 @@
<xsl:variable name="compact"
select="not (para|description|requires|effects|postconditions|returns|
throws|complexity|notes|rationale) and
($boost.compact.function='1')"/>
($boost.compact.function='1') and
not (local-name(.)='method')"/>
<xsl:if test="not ($compact)">
<xsl:call-template name="function.documentation">
@ -1052,13 +1055,6 @@
<xsl:template match="overloaded-method" mode="reference">
<xsl:variable name="name" select="@name"/>
<!-- True if we should compact this function -->
<xsl:variable name="compact"
select="not (para|description|requires|effects|postconditions|returns|
throws|complexity|notes|rationale) and
($boost.compact.function='1')"/>
<xsl:if test="not ($compact)">
<xsl:call-template name="function.documentation">
<xsl:with-param name="text">
<para>
@ -1082,7 +1078,6 @@
<xsl:call-template name="function-requirements"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
<!-- Group member functions together under a category name (synopsis)-->