<xsl:apply-templates/>
</xsl:variable>
<xsl:value-of select="normalize-space($content)"/>
- <xsl:text> </xsl:text>
+ <xsl:text>.sp </xsl:text>
</xsl:template>
<xsl:template match="address|literallayout|programlisting|screen|synopsis">
<xsl:apply-templates/>
<xsl:text> </xsl:text>
<xsl:text>.fi </xsl:text>
+ <!-- * if first following sibling node of this verbatim -->
+ <!-- * environment is a text node, output a line of space before it -->
+ <xsl:if test="following-sibling::node()[1][name(.) = '']">
+ <xsl:text>.sp </xsl:text>
+ </xsl:if>
</xsl:template>
<xsl:template match="informalexample">
following-sibling::remark">
<!-- * Make sure multiple paragraphs within a list item don't -->
<!-- * merge together. -->
- <xsl:text> </xsl:text>
+ <xsl:text>.sp </xsl:text>
</xsl:if>
</xsl:template>
</xsl:variable>
<xsl:if
test="starts-with(translate(.,'	 ',' '), ' ')
- and preceding-sibling::node()[name(.)!='']
+ and preceding-sibling::node()[1][name(.)!='']
and normalize-space($content) != ''
and not(
- preceding-sibling::variablelist[1] or
- preceding-sibling::glosslistlist[1] or
- preceding-sibling::itemizedlist[1] or
- preceding-sibling::orderededlist[1] or
- preceding-sibling::procedure[1]
+ preceding-sibling::*[1][
+ self::variablelist or
+ self::glosslistlist or
+ self::itemizedlist or
+ self::orderededlist or
+ self::procedure or
+ self::address or
+ self::literallayout or
+ self::programlisting or
+ self::screen
+ ]
)
">
<xsl:text> </xsl:text>
<xsl:value-of select="normalize-space($content)"/>
<xsl:if
test="translate(substring(., string-length(.), 1),'	 ',' ') = ' '
- and following-sibling::node()[name(.)!='']
+ and following-sibling::node()[1][name(.)!='']
">
<xsl:if test="normalize-space($content) != ''">
<xsl:text> </xsl:text>