mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
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:
parent
c1cdd4526f
commit
075fcc3cbd
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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)-->
|
||||
|
Loading…
x
Reference in New Issue
Block a user