</xsl:template>
<xsl:template match="refpurpose">
- <xsl:text> </xsl:text>
- <xsl:call-template name="dingbat">
- <xsl:with-param name="dingbat">em-dash</xsl:with-param>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:apply-templates/>
+ <xsl:if test="node()">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat">em-dash</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates/>
+ </xsl:if>
</xsl:template>
<xsl:template match="refdescriptor">
</xsl:template>
<xsl:template match="refpurpose">
- <xsl:text> </xsl:text>
- <xsl:call-template name="dingbat">
- <xsl:with-param name="dingbat">em-dash</xsl:with-param>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:apply-templates/>
+ <xsl:if test="node()">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat">em-dash</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates/>
+ </xsl:if>
</xsl:template>
<xsl:template match="refdescriptor">
<!-- * So why don't we precede the hyphen with a backslash here? -->
<!-- * Well, because it's added later, by the apply-string-subst-map -->
<!-- * template, before we generate final output -->
- <xsl:text> - </xsl:text>
- <xsl:value-of select="normalize-space (refpurpose)"/>
+ <xsl:if test="refpurpose/node()">
+ <xsl:text> - </xsl:text>
+ <xsl:value-of select="normalize-space(refpurpose)"/>
+ </xsl:if>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="refsect2|refentry/refsection/refsection">
<xsl:call-template name="mark.subheading"/>
<xsl:variable name="title">
- <xsl:value-of select="(info/title
- |refsectioninfo/title
- |refsect1info/title
- |title)[1]"/>
+ <xsl:apply-templates
+ select="(info/title
+ |refsectioninfo/title
+ |refsect1info/title
+ |title)[1]/node()"/>
+
</xsl:variable>
<xsl:text>.SS "</xsl:text>
- <xsl:value-of select="$title"/>
+ <xsl:value-of select="normalize-space($title)"/>
<xsl:text>" </xsl:text>
<xsl:call-template name="mark.subheading"/>
<xsl:choose>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
- <xsl:text>.\" end of SS subsection "</xsl:text>
- <xsl:value-of select="$title"/>
- <xsl:text>" </xsl:text>
</xsl:template>
<xsl:template match="refsect3|refentry/refsection/refsection/refsection">
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
- <xsl:text>.\" end of subsection "</xsl:text>
- <xsl:value-of select="$title"/>
- <xsl:text>" </xsl:text>
</xsl:template>
<xsl:template match="refsection">
<xsl:text>.RS (\n(SNu) </xsl:text>
<xsl:apply-templates/>
<xsl:text>.RE </xsl:text>
- <xsl:text>.\" end of subsection "</xsl:text>
- <xsl:value-of select="$title"/>
- <xsl:text>" </xsl:text>
</xsl:template>
<!-- ==================================================================== -->