mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
Support disabling sorting function and template parameters.
This commit adds a new XSL parameter boost.sort.params, which allows users to disable alphabetical sorting of the function and template parameters in detailed descriptions of functions and classes. By default, sorting is enabled, which maintains the previous behavior. Sorting is disabled when the parameter is set to 0. In this case, parameters are listed in the order they are listed in the BoostBook documentation, which is normally the same as they are listed in the function signature or template preamble.
This commit is contained in:
parent
faacd1f26a
commit
44d887c5f2
@ -24,6 +24,10 @@
|
|||||||
unless everything fits on a single line. -->
|
unless everything fits on a single line. -->
|
||||||
<xsl:param name="boost.short.result.type">12</xsl:param>
|
<xsl:param name="boost.short.result.type">12</xsl:param>
|
||||||
|
|
||||||
|
<!-- When true, the stylesheet will sort parameters of functions and
|
||||||
|
templates alphabetically in detailed description. -->
|
||||||
|
<xsl:param name="boost.sort.params">1</xsl:param>
|
||||||
|
|
||||||
<!-- Display a function declaration -->
|
<!-- Display a function declaration -->
|
||||||
<xsl:template name="function">
|
<xsl:template name="function">
|
||||||
<xsl:param name="indentation"/>
|
<xsl:param name="indentation"/>
|
||||||
@ -822,7 +826,7 @@
|
|||||||
list-presentation="table"
|
list-presentation="table"
|
||||||
</xsl:processing-instruction>
|
</xsl:processing-instruction>
|
||||||
<xsl:for-each select="parameter|signature/parameter">
|
<xsl:for-each select="parameter|signature/parameter">
|
||||||
<xsl:sort select="attribute::name"/>
|
<xsl:sort select="attribute::name[$boost.sort.params!=0]"/>
|
||||||
<xsl:if test="description">
|
<xsl:if test="description">
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
@ -853,7 +857,7 @@
|
|||||||
</xsl:processing-instruction>
|
</xsl:processing-instruction>
|
||||||
<xsl:for-each select="template/template-type-parameter|
|
<xsl:for-each select="template/template-type-parameter|
|
||||||
template/template-nontype-parameter">
|
template/template-nontype-parameter">
|
||||||
<xsl:sort select="attribute::name"/>
|
<xsl:sort select="attribute::name[$boost.sort.params!=0]"/>
|
||||||
<xsl:if test="purpose">
|
<xsl:if test="purpose">
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user