mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 02:43:58 +00:00
function.xsl, template.xsl, type.xsl:
- Deal with changes in the DTD html.xsl, html-single.xsl: - Better handling of function semantic clauses [SVN r17940]
This commit is contained in:
parent
3eb2ae462c
commit
9c4a80af08
@ -58,6 +58,10 @@
|
||||
|
||||
<!-- Calculate the type -->
|
||||
<xsl:variable name="type">
|
||||
<xsl:if test="@specifiers">
|
||||
<xsl:value-of select="concat(@specifiers, ' ')"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:choose>
|
||||
<!-- Conversion operators have an empty type, because the return
|
||||
type is part of the name -->
|
||||
@ -69,27 +73,15 @@
|
||||
<!-- Copy assignment operators return a reference to the class
|
||||
they are in, unless another type has been explicitly
|
||||
provided in the element. -->
|
||||
<xsl:when test="$copy-assign-for and not(type) and not(@return-type)">
|
||||
<xsl:when test="$copy-assign-for and not(type) and type">
|
||||
<xsl:value-of select="concat($copy-assign-for, '& ')"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="type">
|
||||
<xsl:apply-templates select="type" mode="annotation"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@return-type">
|
||||
<xsl:value-of select="@return-type"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:message>
|
||||
<xsl:text>Warning: no type for function '</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>'</xsl:text>
|
||||
</xsl:message>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="type" mode="annotation"/>
|
||||
<xsl:if test="type">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
@ -108,19 +100,7 @@
|
||||
</xsl:when>
|
||||
<xsl:when test="$name='conversion-operator'">
|
||||
<xsl:text>operator </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="type">
|
||||
<xsl:apply-templates select="type" mode="annotation"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@return-type">
|
||||
<xsl:value-of select="@return-type"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:message>
|
||||
<xsl:text>Warning: no type for conversion operator</xsl:text>
|
||||
</xsl:message>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates select="type" mode="annotation"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$name"/>
|
||||
@ -994,7 +974,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!-- Group member functions together under a category name (synopsis)-->
|
||||
<xsl:template match="member-function-group" mode="synopsis">
|
||||
<xsl:template match="method-group" mode="synopsis">
|
||||
<xsl:param name="indentation"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
@ -1015,7 +995,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!-- Group member functions together under a category name (reference)-->
|
||||
<xsl:template match="member-function-group" mode="reference">
|
||||
<xsl:template match="method-group" mode="reference">
|
||||
<xsl:call-template name="member-documentation">
|
||||
<xsl:with-param name="name">
|
||||
<xsl:call-template name="anchor">
|
||||
|
@ -16,12 +16,26 @@
|
||||
<p><xsl:apply-templates mode="boost.variablelist"/></p>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="variablelist">
|
||||
<p><xsl:apply-templates mode="boost.variablelist"/></p>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="varlistentry" mode="boost.variablelist">
|
||||
<xsl:if test="position() > 1">
|
||||
<br/>
|
||||
</xsl:if>
|
||||
<b><xsl:apply-templates select="term"/></b>:
|
||||
<xsl:apply-templates select="listitem/*|listitem/text()"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name(listitem/*[1])='simpara' or
|
||||
local-name(listitem/*[1])='para'">
|
||||
<xsl:apply-templates
|
||||
select="listitem/*[1]/*|listitem/*[1]/text()"/>
|
||||
<xsl:apply-templates select="(listitem/*|listitem/text())[position() > 1]"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="listitem/*|listitem/text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
13
xsl/html.xsl
13
xsl/html.xsl
@ -159,6 +159,17 @@
|
||||
<br/>
|
||||
</xsl:if>
|
||||
<b><xsl:apply-templates select="term"/></b>:
|
||||
<xsl:apply-templates select="listitem/*|listitem/text()"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name(listitem/*[1])='simpara' or
|
||||
local-name(listitem/*[1])='para'">
|
||||
<xsl:apply-templates
|
||||
select="listitem/*[1]/*|listitem/*[1]/text()"/>
|
||||
<xsl:apply-templates select="(listitem/*|listitem/text())[position() > 1]"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="listitem/*|listitem/text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<xsl:when test="not(template)">
|
||||
0
|
||||
</xsl:when>
|
||||
<xsl:when test="template/*/@comment|template/*/purpose">
|
||||
<xsl:when test="template/*/purpose">
|
||||
<!-- TBD: The resulting value need only be greater than the number of
|
||||
columns. We chose to add 17 because it's funny for C++
|
||||
programmers. :) -->
|
||||
@ -193,7 +193,7 @@
|
||||
<xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$parameters/@comment|$parameters/purpose">
|
||||
<xsl:when test="$parameters/purpose">
|
||||
<xsl:call-template name="template.reference.parameters.comments">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
@ -233,28 +233,18 @@
|
||||
</xsl:if>
|
||||
|
||||
<!-- Display the comment -->
|
||||
<xsl:if test="$parameter/@comment|$parameter/purpose">
|
||||
<xsl:if test="$parameter/purpose">
|
||||
<xsl:call-template name="highlight-comment">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@comment">
|
||||
<xsl:message>
|
||||
<xsl:text>Warning: 'comment' attribute of template parameter is deprecated. Use 'purpose' element.</xsl:text>
|
||||
<xsl:call-template name="print.warning.context"/>
|
||||
</xsl:message>
|
||||
<xsl:value-of select="concat(' // ',$parameter/@comment)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text> // </xsl:text>
|
||||
<xsl:apply-templates select="purpose"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text> // </xsl:text>
|
||||
<xsl:apply-templates
|
||||
select="$parameter/purpose/*|$parameter/purpose/text()"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Indent the next line -->
|
||||
<xsl:if test="$parameter/@comment or $parameter/purpose or $rest">
|
||||
<xsl:if test="$parameter/purpose or $rest">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
|
@ -332,6 +332,11 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:if test="not(@name = '')">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:text> = </xsl:text>
|
||||
|
||||
<xsl:call-template name="source-highlight">
|
||||
@ -572,7 +577,7 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
|
||||
<!-- Member functions -->
|
||||
<xsl:apply-templates
|
||||
select="member-function-group|method|overloaded-method"
|
||||
select="method-group|method|overloaded-method"
|
||||
mode="synopsis">
|
||||
<xsl:with-param name="indentation" select="2"/>
|
||||
</xsl:apply-templates>
|
||||
@ -608,7 +613,7 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
|
||||
<xsl:call-template name="construct-copy-destruct-reference"/>
|
||||
<xsl:apply-templates
|
||||
select="member-function-group|method|overloaded-method"
|
||||
select="method-group|method|overloaded-method"
|
||||
mode="reference"/>
|
||||
<xsl:apply-templates select="free-function-group" mode="reference">
|
||||
<xsl:with-param name="class" select="@name"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user