mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
Make sure that every bit of C++ code that we output goes through the syntax highlighter
[SVN r62294]
This commit is contained in:
parent
a29da889c0
commit
f3e0f03654
@ -161,7 +161,7 @@
|
|||||||
|
|
||||||
<!-- Build the text that follows the declarator-->
|
<!-- Build the text that follows the declarator-->
|
||||||
<xsl:variable name="postdeclarator">
|
<xsl:variable name="postdeclarator">
|
||||||
<xsl:if test="@cv">
|
<xsl:if test="@cv and @cv != ''">
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<xsl:value-of select="@cv"/>
|
<xsl:value-of select="@cv"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
@ -246,7 +246,9 @@
|
|||||||
<xsl:with-param name="highlight" select="true()"/>
|
<xsl:with-param name="highlight" select="true()"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:text>(</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'('"/>
|
||||||
|
</xsl:call-template>
|
||||||
<xsl:call-template name="function-parameters">
|
<xsl:call-template name="function-parameters">
|
||||||
<xsl:with-param name="include-names" select="$include-names"/>
|
<xsl:with-param name="include-names" select="$include-names"/>
|
||||||
<xsl:with-param name="indentation"
|
<xsl:with-param name="indentation"
|
||||||
@ -254,12 +256,16 @@
|
|||||||
+ string-length($function-name) + 1"/>
|
+ string-length($function-name) + 1"/>
|
||||||
<xsl:with-param name="final" select="true()"/>
|
<xsl:with-param name="final" select="true()"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>)</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="')'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:call-template name="source-highlight">
|
<xsl:call-template name="source-highlight">
|
||||||
<xsl:with-param name="text" select="$postdeclarator"/>
|
<xsl:with-param name="text" select="$postdeclarator"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
<!-- This declaration will take multiple lines -->
|
<!-- This declaration will take multiple lines -->
|
||||||
@ -317,7 +323,9 @@
|
|||||||
<xsl:with-param name="link-type" select="$link-type"/>
|
<xsl:with-param name="link-type" select="$link-type"/>
|
||||||
<xsl:with-param name="highlight" select="true()"/>
|
<xsl:with-param name="highlight" select="true()"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>(</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'('"/>
|
||||||
|
</xsl:call-template>
|
||||||
<xsl:call-template name="function-parameters">
|
<xsl:call-template name="function-parameters">
|
||||||
<xsl:with-param name="include-names" select="$include-names"/>
|
<xsl:with-param name="include-names" select="$include-names"/>
|
||||||
<xsl:with-param name="indentation"
|
<xsl:with-param name="indentation"
|
||||||
@ -325,11 +333,15 @@
|
|||||||
+ string-length($function-name) + 1"/>
|
+ string-length($function-name) + 1"/>
|
||||||
<xsl:with-param name="final" select="true()"/>
|
<xsl:with-param name="final" select="true()"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>)</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="')'"/>
|
||||||
|
</xsl:call-template>
|
||||||
<xsl:call-template name="source-highlight">
|
<xsl:call-template name="source-highlight">
|
||||||
<xsl:with-param name="text" select="$postdeclarator"/>
|
<xsl:with-param name="text" select="$postdeclarator"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
@ -364,7 +376,18 @@
|
|||||||
<!-- Information for this parameter -->
|
<!-- Information for this parameter -->
|
||||||
<xsl:variable name="parameter" select="$parameters[position()=1]"/>
|
<xsl:variable name="parameter" select="$parameters[position()=1]"/>
|
||||||
<xsl:variable name="pack">
|
<xsl:variable name="pack">
|
||||||
<xsl:if test="$parameter/@pack=1"><xsl:text>...</xsl:text></xsl:if>
|
<xsl:if test="$parameter/@pack=1">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$final">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'...'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>...</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="name">
|
<xsl:variable name="name">
|
||||||
<xsl:if test="$include-names and $parameter/@name != ''">
|
<xsl:if test="$include-names and $parameter/@name != ''">
|
||||||
@ -377,18 +400,32 @@
|
|||||||
<xsl:variable name="default">
|
<xsl:variable name="default">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$parameter/@default">
|
<xsl:when test="$parameter/@default">
|
||||||
<xsl:text> = </xsl:text>
|
|
||||||
<xsl:value-of select="$parameter/@default"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:when test="$parameter/default">
|
|
||||||
<xsl:text> = </xsl:text>
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$final">
|
<xsl:when test="$final">
|
||||||
<xsl:apply-templates
|
<xsl:call-template name="highlight-text">
|
||||||
select="$parameter/default/*|$parameter/default/text()"
|
<xsl:with-param name="text" select="concat(' = ', $parameter/@default)"/>
|
||||||
mode="annotation"/>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
<xsl:text> = </xsl:text>
|
||||||
|
<xsl:value-of select="$parameter/@default"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$parameter/default">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$final">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' = '"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:apply-templates
|
||||||
|
select="$parameter/default/*|$parameter/default/text()"
|
||||||
|
mode="annotation">
|
||||||
|
<xsl:with-param name="highlight" select="true()"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text> = </xsl:text>
|
||||||
<xsl:value-of select="string($parameter/default)"/>
|
<xsl:value-of select="string($parameter/default)"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
@ -407,13 +444,15 @@
|
|||||||
or not($wrap)">
|
or not($wrap)">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$final">
|
<xsl:when test="$final">
|
||||||
<xsl:value-of select="$prefix"/>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="$prefix"/>
|
||||||
|
</xsl:call-template>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="$parameter/paramtype/*|$parameter/paramtype/text()"
|
select="$parameter/paramtype/*|$parameter/paramtype/text()"
|
||||||
mode="annotation">
|
mode="annotation">
|
||||||
<xsl:with-param name="highlight" select="true()"/>
|
<xsl:with-param name="highlight" select="true()"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
<xsl:value-of select="$pack"/>
|
<xsl:copy-of select="$pack"/>
|
||||||
<xsl:value-of select="$name"/>
|
<xsl:value-of select="$name"/>
|
||||||
<xsl:copy-of select="$default"/>
|
<xsl:copy-of select="$default"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
@ -437,7 +476,17 @@
|
|||||||
<!-- Parameter goes on next line -->
|
<!-- Parameter goes on next line -->
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<!-- The comma goes on this line -->
|
<!-- The comma goes on this line -->
|
||||||
<xsl:value-of select="$prefix"/><xsl:text> </xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$final">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="$prefix"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$prefix"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
|
||||||
<!-- Indent and print the parameter -->
|
<!-- Indent and print the parameter -->
|
||||||
<xsl:call-template name="indent">
|
<xsl:call-template name="indent">
|
||||||
|
@ -57,7 +57,9 @@
|
|||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates select="type/*|type/text()" mode="annotation" />
|
<xsl:apply-templates select="type/*|type/text()" mode="annotation">
|
||||||
|
<xsl:with-param name="highlight" select="true()"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<xsl:call-template name="link-or-anchor">
|
<xsl:call-template name="link-or-anchor">
|
||||||
<xsl:with-param name="to">
|
<xsl:with-param name="to">
|
||||||
@ -66,7 +68,9 @@
|
|||||||
<xsl:with-param name="text" select="@name" />
|
<xsl:with-param name="text" select="@name" />
|
||||||
<xsl:with-param name="link-type" select="$link-type" />
|
<xsl:with-param name="link-type" select="$link-type" />
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template match="data-member" mode="generate.id">
|
<xsl:template match="data-member" mode="generate.id">
|
||||||
<xsl:call-template name="fully-qualified-id">
|
<xsl:call-template name="fully-qualified-id">
|
||||||
|
@ -29,9 +29,8 @@
|
|||||||
<xsl:with-param name="indentation" select="$indentation"/>
|
<xsl:with-param name="indentation" select="$indentation"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:call-template name="source-highlight">
|
<xsl:call-template name="source-highlight">
|
||||||
<xsl:with-param name="text" select="concat('namespace ',@name)"/>
|
<xsl:with-param name="text" select="concat('namespace ',@name, ' {')"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text> {</xsl:text>
|
|
||||||
|
|
||||||
<!-- Emit namespace types -->
|
<!-- Emit namespace types -->
|
||||||
<xsl:apply-templates select="class|class-specialization|
|
<xsl:apply-templates select="class|class-specialization|
|
||||||
@ -58,7 +57,9 @@
|
|||||||
<xsl:call-template name="indent">
|
<xsl:call-template name="indent">
|
||||||
<xsl:with-param name="indentation" select="$indentation"/>
|
<xsl:with-param name="indentation" select="$indentation"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>}</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'}'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Emit namespace synopsis -->
|
<!-- Emit namespace synopsis -->
|
||||||
|
161
xsl/template.xsl
161
xsl/template.xsl
@ -72,18 +72,31 @@
|
|||||||
<xsl:call-template name="highlight-keyword">
|
<xsl:call-template name="highlight-keyword">
|
||||||
<xsl:with-param name="keyword" select="'template'"/>
|
<xsl:with-param name="keyword" select="'template'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="'<'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text>template</xsl:text>
|
<xsl:text>template</xsl:text>
|
||||||
|
<xsl:text><</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:text><</xsl:text>
|
|
||||||
<xsl:call-template name="template.synopsis.parameters">
|
<xsl:call-template name="template.synopsis.parameters">
|
||||||
<xsl:with-param name="indentation" select="$indentation + 9"/>
|
<xsl:with-param name="indentation" select="$indentation + 9"/>
|
||||||
<xsl:with-param name="wrap" select="$wrap"/>
|
<xsl:with-param name="wrap" select="$wrap"/>
|
||||||
<xsl:with-param name="highlight" select="$highlight"/>
|
<xsl:with-param name="highlight" select="$highlight"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>> </xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="'>'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>> </xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Display a list of template parameters for a synopsis (no comments) -->
|
<!-- Display a list of template parameters for a synopsis (no comments) -->
|
||||||
@ -100,7 +113,16 @@
|
|||||||
<xsl:if test="$parameters">
|
<xsl:if test="$parameters">
|
||||||
<!-- Emit the prefix (either a comma-space, or empty if this is
|
<!-- Emit the prefix (either a comma-space, or empty if this is
|
||||||
the first parameter) -->
|
the first parameter) -->
|
||||||
<xsl:value-of select="$prefix"/>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="$prefix"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$prefix"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
<!-- Get the actual parameter and its attributes -->
|
<!-- Get the actual parameter and its attributes -->
|
||||||
<xsl:variable name="parameter" select="$parameters[position()=1]"/>
|
<xsl:variable name="parameter" select="$parameters[position()=1]"/>
|
||||||
@ -179,17 +201,30 @@
|
|||||||
<xsl:call-template name="highlight-keyword">
|
<xsl:call-template name="highlight-keyword">
|
||||||
<xsl:with-param name="keyword" select="'template'"/>
|
<xsl:with-param name="keyword" select="'template'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="'<'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text>template</xsl:text>
|
<xsl:text>template</xsl:text>
|
||||||
|
<xsl:text><</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:text><</xsl:text>
|
|
||||||
<xsl:call-template name="template.reference.parameters">
|
<xsl:call-template name="template.reference.parameters">
|
||||||
<xsl:with-param name="indentation" select="$indentation + 9"/>
|
<xsl:with-param name="indentation" select="$indentation + 9"/>
|
||||||
<xsl:with-param name="highlight" select="$highlight"/>
|
<xsl:with-param name="highlight" select="$highlight"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>> </xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="'>'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>> </xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
@ -236,7 +271,16 @@
|
|||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:if test="$rest">
|
<xsl:if test="$rest">
|
||||||
<xsl:text>, </xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="', '"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>, </xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<!-- Display the comment -->
|
<!-- Display the comment -->
|
||||||
@ -314,7 +358,18 @@
|
|||||||
<xsl:text>typename</xsl:text>
|
<xsl:text>typename</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:if test="$parameter/@pack=1"><xsl:text>...</xsl:text></xsl:if>
|
<xsl:if test="$parameter/@pack=1">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'...'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>...</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
|
|
||||||
<xsl:call-template name="template.parameter.name">
|
<xsl:call-template name="template.parameter.name">
|
||||||
@ -358,7 +413,16 @@
|
|||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:if test="not($def='')">
|
<xsl:if test="not($def='')">
|
||||||
<xsl:text> = </xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' = '"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text> = </xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
<xsl:copy-of select="$def"/>
|
<xsl:copy-of select="$def"/>
|
||||||
|
|
||||||
@ -389,7 +453,18 @@
|
|||||||
<xsl:value-of select="$parameter/type/*|$parameter/type/text()"/>
|
<xsl:value-of select="$parameter/type/*|$parameter/type/text()"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:if test="$parameter/@pack=1"><xsl:text>...</xsl:text></xsl:if>
|
<xsl:if test="$parameter/@pack=1">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'...'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>...</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
|
|
||||||
<xsl:call-template name="template.parameter.name">
|
<xsl:call-template name="template.parameter.name">
|
||||||
@ -402,7 +477,16 @@
|
|||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:if test="not($def='')">
|
<xsl:if test="not($def='')">
|
||||||
<xsl:text> = </xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' = '"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text> = </xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$highlight">
|
<xsl:when test="$highlight">
|
||||||
@ -423,25 +507,72 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="template-varargs" mode="print.parameter">
|
<xsl:template match="template-varargs" mode="print.parameter">
|
||||||
<xsl:text>...</xsl:text>
|
<xsl:param name="highlight" select="true()"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'...'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>...</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="specialization">
|
<xsl:template match="specialization">
|
||||||
<xsl:param name="highlight" select="true()"/>
|
<xsl:param name="highlight" select="true()"/>
|
||||||
<xsl:text><</xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'<'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text><</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
<xsl:apply-templates select="template-arg">
|
<xsl:apply-templates select="template-arg">
|
||||||
<xsl:with-param name="highlight" select="$highlight"/>
|
<xsl:with-param name="highlight" select="$highlight"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
<xsl:text>></xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'>'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>></xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="template-arg">
|
<xsl:template match="template-arg">
|
||||||
|
<xsl:param name="highlight" select="true()"/>
|
||||||
<xsl:if test="position() > 1">
|
<xsl:if test="position() > 1">
|
||||||
<xsl:text>, </xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="', '"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>, </xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates mode="highlight"/>
|
<xsl:apply-templates mode="highlight"/>
|
||||||
<xsl:if test="@pack=1">
|
<xsl:if test="@pack=1">
|
||||||
<xsl:text>...</xsl:text>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$highlight">
|
||||||
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'...'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>...</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
88
xsl/type.xsl
88
xsl/type.xsl
@ -134,7 +134,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<xsl:value-of select="@name"/>
|
<xsl:value-of select="@name"/>
|
||||||
<xsl:apply-templates select="specialization"/>
|
<xsl:apply-templates select="specialization"/>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
@ -160,7 +162,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:apply-templates select="specialization"/>
|
<xsl:apply-templates select="specialization"/>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
@ -195,7 +199,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:with-param name="text" select="string(@name)"/>
|
<xsl:with-param name="text" select="string(@name)"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:apply-templates select="specialization"/>
|
<xsl:apply-templates select="specialization"/>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
||||||
@ -338,7 +344,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:with-param name="link-type" select="$link-type"/>
|
<xsl:with-param name="link-type" select="$link-type"/>
|
||||||
<xsl:with-param name="highlight" select="true()"/>
|
<xsl:with-param name="highlight" select="true()"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
||||||
@ -461,7 +469,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
|
|
||||||
<xsl:if test="not(@name = '')">
|
<xsl:if test="not(@name = '')">
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<xsl:value-of select="@name"/>
|
<xsl:call-template name="source-highlight">
|
||||||
|
<xsl:with-param name="text" select="@name"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:text> = </xsl:text>
|
<xsl:text> = </xsl:text>
|
||||||
@ -471,7 +481,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:apply-templates select="default/*|default/text()"/>
|
<xsl:apply-templates select="default/*|default/text()"/>
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:if test="purpose">
|
<xsl:if test="purpose">
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
@ -523,7 +535,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<!-- Output the type -->
|
<!-- Output the type -->
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="type">
|
<xsl:when test="type">
|
||||||
<xsl:apply-templates select="type/*|type/text()" mode="annotation"/>
|
<xsl:apply-templates select="type/*|type/text()" mode="annotation">
|
||||||
|
<xsl:with-param name="highlight" select="true()"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:message>
|
<xsl:message>
|
||||||
@ -581,14 +595,20 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:when test="$single-line-candidate and
|
<xsl:when test="$single-line-candidate and
|
||||||
(string-length($single-line) + $indentation + 3
|
(string-length($single-line) + $indentation + 3
|
||||||
< $max-columns)">
|
< $max-columns)">
|
||||||
<xsl:text> : </xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' : '"/>
|
||||||
|
</xsl:call-template>
|
||||||
<xsl:call-template name="print.base.classes.single"/>
|
<xsl:call-template name="print.base.classes.single"/>
|
||||||
<xsl:text> {</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' {'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="$single-line-candidate and
|
<xsl:when test="$single-line-candidate and
|
||||||
(string-length($single-line) + $base-indentation + 2
|
(string-length($single-line) + $base-indentation + 2
|
||||||
< $max-columns)">
|
< $max-columns)">
|
||||||
<xsl:text> : </xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' : '"/>
|
||||||
|
</xsl:call-template>
|
||||||
<xsl:call-template name="indent">
|
<xsl:call-template name="indent">
|
||||||
<xsl:with-param name="indentation" select="$base-indentation + 2"/>
|
<xsl:with-param name="indentation" select="$base-indentation + 2"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
@ -597,10 +617,14 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:call-template name="indent">
|
<xsl:call-template name="indent">
|
||||||
<xsl:with-param name="indentation" select="$base-indentation"/>
|
<xsl:with-param name="indentation" select="$base-indentation"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>{</xsl:text>
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="'{'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text> : </xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' : '"/>
|
||||||
|
</xsl:call-template>
|
||||||
<xsl:call-template name="print.base.classes.multi">
|
<xsl:call-template name="print.base.classes.multi">
|
||||||
<xsl:with-param name="indentation" select="$indentation + 3"/>
|
<xsl:with-param name="indentation" select="$indentation + 3"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
@ -608,7 +632,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:call-template name="indent">
|
<xsl:call-template name="indent">
|
||||||
<xsl:with-param name="indentation" select="$base-indentation"/>
|
<xsl:with-param name="indentation" select="$base-indentation"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>{</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'{'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
@ -846,7 +872,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:call-template name="highlight-keyword">
|
<xsl:call-template name="highlight-keyword">
|
||||||
<xsl:with-param name="keyword" select="$specification"/>
|
<xsl:with-param name="keyword" select="$specification"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>:</xsl:text>
|
<xsl:call-template name="highlight-special">
|
||||||
|
<xsl:with-param name="text" select="':'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="access" mode="synopsis">
|
<xsl:template match="access" mode="synopsis">
|
||||||
@ -940,7 +968,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<!-- Opening brace -->
|
<!-- Opening brace -->
|
||||||
<xsl:text> {</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' {'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
||||||
@ -973,7 +1003,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:call-template name="indent">
|
<xsl:call-template name="indent">
|
||||||
<xsl:with-param name="indentation" select="$indentation"/>
|
<xsl:with-param name="indentation" select="$indentation"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>};</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="'};'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Emit nested class reference documentation -->
|
<!-- Emit nested class reference documentation -->
|
||||||
@ -1169,7 +1201,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:apply-templates select="type" mode="highlight"/>
|
<xsl:apply-templates select="type" mode="highlight"/>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<xsl:value-of select="@name"/>
|
<xsl:value-of select="@name"/>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
@ -1283,16 +1317,22 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
<xsl:with-param name="higlhight" select="false()"/>
|
<xsl:with-param name="higlhight" select="false()"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:text> { </xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' { '"/>
|
||||||
|
</xsl:call-template>
|
||||||
<xsl:call-template name="type.enum.list.compact">
|
<xsl:call-template name="type.enum.list.compact">
|
||||||
<xsl:with-param name="indentation"
|
<xsl:with-param name="indentation"
|
||||||
select="$indentation + string-length(@name) + 8"/>
|
select="$indentation + string-length(@name) + 8"/>
|
||||||
<xsl:with-param name="compact" select="true()"/>
|
<xsl:with-param name="compact" select="true()"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text> }</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' }'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:text>;</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="';'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Enumeration reference at namespace level -->
|
<!-- Enumeration reference at namespace level -->
|
||||||
@ -1354,14 +1394,18 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
|||||||
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<xsl:variable name="header" select="concat(' ', @name, ' { ')"/>
|
<xsl:variable name="header" select="concat(' ', @name, ' { ')"/>
|
||||||
<xsl:value-of select="$header"/>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="$header"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<!-- Print the enumeration values -->
|
<!-- Print the enumeration values -->
|
||||||
<xsl:call-template name="type.enum.list.compact">
|
<xsl:call-template name="type.enum.list.compact">
|
||||||
<xsl:with-param name="indentation" select="4 + string-length($header)"/>
|
<xsl:with-param name="indentation" select="4 + string-length($header)"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:text> };</xsl:text>
|
<xsl:call-template name="highlight-text">
|
||||||
|
<xsl:with-param name="text" select="' };'"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- List enumeration values in a compact form e.g.,
|
<!-- List enumeration values in a compact form e.g.,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user