<xsl:otherwise>
<xsl:call-template name="mark.subheading"/>
<xsl:text>.SH "</xsl:text>
- <xsl:apply-templates select="." mode="title.markup"/>
+ <xsl:apply-templates select="." mode="subheading.markup"/>
<xsl:text>"</xsl:text>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:template>
<xsl:template match="refsynopsisdiv">
- <xsl:call-template name="mark.subheading"/>
- <xsl:text>.SH "</xsl:text>
- <xsl:apply-templates select="." mode="title.markup"/>
- <xsl:text>" </xsl:text>
- <xsl:call-template name="mark.subheading"/>
+ <xsl:call-template name="make.subheading">
+ <xsl:with-param name="title">
+ <xsl:apply-templates select="." mode="subheading.markup"/>
+ </xsl:with-param>
+ </xsl:call-template>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="refsect1|refentry/refsection">
<xsl:variable name="title">
- <xsl:apply-templates select="." mode="title.markup"/>
+ <xsl:apply-templates select="." mode="subheading.markup"/>
</xsl:variable>
- <xsl:call-template name="mark.subheading"/>
- <xsl:text>.SH "</xsl:text>
- <xsl:value-of select="normalize-space($title)"/>
- <xsl:text>" </xsl:text>
- <xsl:call-template name="mark.subheading"/>
+ <xsl:call-template name="make.subheading">
+ <xsl:with-param name="title">
+ <xsl:value-of select="normalize-space($title)"/>
+ </xsl:with-param>
+ </xsl:call-template>
<xsl:apply-templates/>
</xsl:template>
|refsectioninfo/title
|refsect1info/title
|title)[1]/node()"/>
-
</xsl:variable>
<xsl:text>.SS "</xsl:text>
<xsl:value-of select="normalize-space($title)"/>
<!-- ==================================================================== -->
- <!-- * Use uppercase to render titles of all instances of Refsect1 or -->
- <!-- * top-level Refsection, including in cross-references -->
<xsl:template match="refsect1|refentry/refsection"
- mode="title.markup">
+ mode="subheading.markup">
<xsl:variable name="title" select="(info/title
- |refsectioninfo/title
- |refsect1info/title
- |title)[1]"/>
- <xsl:call-template name="string.upper">
- <xsl:with-param name="string">
+ |refsectioninfo/title
+ |refsect1info/title
+ |title)[1]"/>
+ <xsl:variable name="string">
+ <xsl:apply-templates select="$title" mode="title.markup"/>
+ </xsl:variable>
+ <xsl:call-template name="make.title.pair">
+ <xsl:with-param name="title" select="$string"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="refsect1|refentry/refsection"
+ mode="title.markup">
+ <!-- * Note: This template is used just for generating the text for -->
+ <!-- * cross-references to Refsect1 or top-level Refsection instances. -->
+ <xsl:variable name="title" select="(info/title
+ |refsectioninfo/title
+ |refsect1info/title
+ |title)[1]"/>
+ <xsl:call-template name="process.SH.xref">
+ <xsl:with-param name="title">
<xsl:apply-templates select="$title" mode="title.markup"/>
</xsl:with-param>
</xsl:call-template>
<!-- * Output of Titles from Xref with Endterm needs to be handled -->
<!-- * separately from output for Endterm-less Xref -->
<xsl:template match="refsect1/title
- |refentry/refsection/title
- |refsynopsisdiv/title"
- mode="endterm">
- <xsl:call-template name="string.upper">
- <xsl:with-param name="string">
+ |refentry/refsection/title
+ |refsynopsisdiv/title"
+ mode="endterm">
+ <xsl:call-template name="process.SH.xref">
+ <xsl:with-param name="title">
<xsl:apply-templates/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
- <!-- * Use uppercase to render titles of all instances of Refsynopsisdiv, -->
- <!-- * including in cross-references -->
+ <xsl:template match="refsynopsisdiv" mode="subheading.markup">
+ <xsl:param name="allow-anchors" select="0"/>
+ <xsl:variable name="title">
+ <xsl:call-template name="get.refsynopsisdiv.title">
+ <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="make.title.pair">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ </xsl:template>
+
<xsl:template match="refsynopsisdiv" mode="title.markup">
+ <!-- * Note: This template is used just for generating the text for -->
+ <!-- * cross-references to Refsynopsisdiv instances. -->
<xsl:param name="allow-anchors" select="0"/>
- <xsl:call-template name="string.upper">
- <xsl:with-param name="string">
- <xsl:choose>
- <xsl:when test="info/title
- |refsynopsisdivinfo/title
- |title">
- <xsl:apply-templates
- select="(info/title
- |refsynopsisdivinfo/title
- |title)[1]" mode="title.markup">
- <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
+ <xsl:variable name="title">
+ <xsl:call-template name="get.refsynopsisdiv.title">
+ <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="process.SH.xref">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="get.refsynopsisdiv.title">
+ <xsl:param name="allow-anchors"/>
+ <xsl:choose>
+ <xsl:when test="info/title
+ |refsynopsisdivinfo/title
+ |title">
+ <xsl:apply-templates
+ select="(info/title
+ |refsynopsisdivinfo/title
+ |title)[1]" mode="title.markup">
+ <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="refnamediv" mode="subheading.markup">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'RefName'"/>
</xsl:call-template>
</xsl:template>
- <!-- * Use uppercase to render titles of all instances of Refnamediv, -->
- <!-- * including in cross-references -->
<xsl:template match="refnamediv" mode="title.markup">
- <xsl:call-template name="string.upper">
- <xsl:with-param name="string">
+ <xsl:call-template name="process.SH.xref">
+ <xsl:with-param name="title">
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'RefName'"/>
</xsl:call-template>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:template>
- <!-- ==================================================================== -->
-
<!-- * suppress any title we don't otherwise process elsewhere -->
-
<xsl:template match="title"/>
+ <!-- ==================================================================== -->
+
+ <xsl:template name="process.SH.xref">
+ <xsl:param name="title"/>
+ <xsl:text>\c</xsl:text>
+ <xsl:text>▒</xsl:text>
+ <xsl:text>.SH-xref </xsl:text>
+ <xsl:text>"</xsl:text>
+ <xsl:value-of select="$title"/>
+ <xsl:text>\c"</xsl:text>
+ <xsl:text>▒</xsl:text>
+ <xsl:text>\&</xsl:text>
+ </xsl:template>
+
</xsl:stylesheet>