<xsl:text>" </xsl:text>
<!-- * the copyright mode="titlepage.mode" template is -->
<!-- * imported from the HTML stylesheets -->
- <xsl:for-each select="(($info[//copyright])[last()]//copyright)">
- <xsl:variable name="contents">
- <xsl:apply-templates select="." mode="titlepage.mode"/>
- </xsl:variable>
- <xsl:value-of select="normalize-space($contents)"/>
- <xsl:text> </xsl:text>
- <xsl:text>.br </xsl:text>
- </xsl:for-each>
- <xsl:text> </xsl:text>
- <xsl:for-each select="(($info[//legalnotice])[last()]//legalnotice)">
- <xsl:apply-templates select="." mode="titlepage.mode"/>
- <xsl:text> </xsl:text>
- <xsl:text>.br </xsl:text>
+ <xsl:for-each select="
+ (($info[//copyright])[last()]//copyright)
+ | (($info[//legalnotice])[last()]//legalnotice)">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'copyright'">
+ <xsl:variable name="contents">
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+ </xsl:variable>
+ <xsl:value-of select="normalize-space($contents)"/>
+ <xsl:text> </xsl:text>
+ <xsl:text>.br </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+ <xsl:text> </xsl:text>
+ <xsl:text>.sp </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl:otherwise/> <!-- * do nothing, no copyright or legalnotice found -->
<!-- * squeeze multiple newlines before a roff request -->
<ss:substitution oldstring=" ." newstring=" ."/>
- <!-- * remove any .sp occurences that directly follow a .PP -->
+ <!-- * remove any .sp instances that directly precede a .PP -->
+ <ss:substitution oldstring=".sp .PP" newstring=".PP"/>
+ <!-- * remove any .sp instances that directly follow a .PP -->
<ss:substitution oldstring=".PP .sp" newstring=".PP"/>
<!-- * squeeze multiple newlines after start of no-fill (verbatim) env. -->
<ss:substitution oldstring=".nf " newstring=".nf "/>