Improve handling of preconditions, postconditions, etc.

[SVN r24674]
This commit is contained in:
Douglas Gregor 2004-08-23 16:00:35 +00:00
parent 60c318f225
commit 39d42d149d

View File

@ -771,6 +771,9 @@ Cannot handle memberdef element with kind=<xsl:value-of select="@kind"/>
<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="detaileddescription/para/simplesect[@kind='pre']"
mode="function-clauses"/>
<xsl:apply-templates <xsl:apply-templates
select="detaileddescription/para/simplesect[@kind='post']" select="detaileddescription/para/simplesect[@kind='post']"
mode="function-clauses"/> mode="function-clauses"/>
@ -784,9 +787,12 @@ Cannot handle memberdef element with kind=<xsl:value-of select="@kind"/>
mode="function-clauses"/> mode="function-clauses"/>
</throws> </throws>
</xsl:if> </xsl:if>
<xsl:apply-templates <xsl:variable name="notes" select="detaileddescription/para/simplesect[@kind='note' or @kind='attention']"/>
select="detaileddescription/para/simplesect[@kind='note']" <xsl:if test="count($notes) &gt; 0">
mode="function-clauses"/> <notes>
<xsl:apply-templates select="$notes" mode="function-clauses"/>
</notes>
</xsl:if>
</xsl:template> </xsl:template>
<!-- Handle free functions --> <!-- Handle free functions -->
@ -1000,8 +1006,10 @@ Cannot handle memberdef element with kind=<xsl:value-of select="@kind"/>
</xsl:template> </xsl:template>
<xsl:template match="para/simplesect" mode="passthrough"> <xsl:template match="para/simplesect" mode="passthrough">
<xsl:if test="not (@kind='return') and <xsl:if test="not (@kind='pre') and
not (@kind='return') and
not (@kind='post') and not (@kind='post') and
not (@kind='attention') and
not (@kind='note')"> not (@kind='note')">
<xsl:apply-templates mode="passthrough"/> <xsl:apply-templates mode="passthrough"/>
</xsl:if> </xsl:if>
@ -1039,6 +1047,11 @@ Cannot handle memberdef element with kind=<xsl:value-of select="@kind"/>
<!-- 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'">
<requires>
<xsl:apply-templates mode="passthrough"/>
</requires>
</xsl:if>
<xsl:if test="@kind='return'"> <xsl:if test="@kind='return'">
<returns> <returns>
<xsl:apply-templates mode="passthrough"/> <xsl:apply-templates mode="passthrough"/>
@ -1049,10 +1062,8 @@ Cannot handle memberdef element with kind=<xsl:value-of select="@kind"/>
<xsl:apply-templates mode="passthrough"/> <xsl:apply-templates mode="passthrough"/>
</postconditions> </postconditions>
</xsl:if> </xsl:if>
<xsl:if test="@kind='note'"> <xsl:if test="@kind='note' or @kind='attention'">
<notes> <xsl:apply-templates mode="passthrough"/>
<xsl:apply-templates mode="passthrough"/>
</notes>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>