mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 02:43:58 +00:00
add globalname for linking to the documentation for a global object
[SVN r47861]
This commit is contained in:
parent
dc60960dd9
commit
99b6f16898
@ -16,6 +16,7 @@
|
||||
<xsl:key name="libraries" match="library" use="@name"/>
|
||||
<xsl:key name="macros" match="macro" use="@name"/>
|
||||
<xsl:key name="headers" match="header" use="@name"/>
|
||||
<xsl:key name="globals" match="namespace/data-member|header/data-member" use="@name"/>
|
||||
<xsl:key name="named-entities" match="class|struct|union|concept|function|overloaded-function|macro|library|namespace/data-member|header/data-member|*[attribute::id]" use="@name|@id"/>
|
||||
|
||||
<xsl:template match="function|overloaded-function" mode="generate.id">
|
||||
@ -84,6 +85,36 @@
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="globalname" mode="annotation">
|
||||
<!-- Determine the (possibly qualified) global name we are looking for -->
|
||||
<xsl:variable name="name">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@alt">
|
||||
<xsl:value-of select="@alt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="string(.)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Determine the unqualified name -->
|
||||
<xsl:variable name="unqualified-name">
|
||||
<xsl:call-template name="strip-qualifiers">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="cxx-link-name">
|
||||
<xsl:with-param name="lookup" select="."/>
|
||||
<xsl:with-param name="type" select="'data-member'"/>
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="string(.)"/>
|
||||
<xsl:with-param name="unqualified-name" select="$unqualified-name"/>
|
||||
<xsl:with-param name="nodes" select="key('globals', $unqualified-name)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="methodname" mode="annotation">
|
||||
<!-- Determine the (possibly qualified) method name we are looking for -->
|
||||
<xsl:variable name="fullname">
|
||||
|
@ -421,7 +421,7 @@ Error: XSL template 'link-or-anchor' called with invalid link-type '<xsl:value-o
|
||||
|
||||
<!-- These DocBook elements have special meaning. Use the annotation mode -->
|
||||
<xsl:template match="classname|methodname|functionname|enumname|
|
||||
macroname|headername">
|
||||
macroname|headername|globalname">
|
||||
<computeroutput>
|
||||
<xsl:apply-templates select="." mode="annotation"/>
|
||||
</computeroutput>
|
||||
|
@ -159,7 +159,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="classname|methodname|functionname|libraryname|enumname|
|
||||
conceptname|macroname" mode="highlight">
|
||||
conceptname|macroname|globalname" mode="highlight">
|
||||
<xsl:apply-templates select="." mode="annotation"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
Loading…
x
Reference in New Issue
Block a user