Output copyright and legalnotice in man-page output in whatever
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 26 Jun 2007 17:20:18 +0000 (17:20 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 26 Jun 2007 17:20:18 +0000 (17:20 +0000)
place they are in in document order. Closes #1690539. Thanks to
Daniel Leidert for reporting.

xsl/manpages/info.xsl
xsl/params/man.string.subst.map.xml

index b11e50653e04210ca5192dfdcbde9024d7f08b2d..cdfe6d7d2288b014727a04bdad01092aec4800ef 100644 (file)
         <xsl:text>"&#10;</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>&#10;</xsl:text>
-          <xsl:text>.br&#10;</xsl:text>
-        </xsl:for-each>
-        <xsl:text>&#10;</xsl:text>
-        <xsl:for-each select="(($info[//legalnotice])[last()]//legalnotice)">
-          <xsl:apply-templates select="." mode="titlepage.mode"/>
-          <xsl:text>&#10;</xsl:text>
-          <xsl:text>.br&#10;</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>&#10;</xsl:text>
+              <xsl:text>.br&#10;</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:apply-templates select="." mode="titlepage.mode"/>
+              <xsl:text>&#10;</xsl:text>
+              <xsl:text>.sp&#10;</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
         </xsl:for-each>
       </xsl:when>
       <xsl:otherwise/> <!-- * do nothing, no copyright or legalnotice found -->
index d056e12a8d1a4265e4445ab9419c989cc2dfe375..4f2a765279c7fcb6c7ca4fd11dcf1bd66baeec7f 100644 (file)
@@ -27,7 +27,9 @@
 
   <!-- * squeeze multiple newlines before a roff request  -->
   <ss:substitution oldstring="&#10;&#10;." newstring="&#10;."/>
-  <!-- * remove any .sp occurences that directly follow a .PP  -->
+  <!-- * remove any .sp instances that directly precede a .PP  -->
+  <ss:substitution oldstring=".sp&#10;.PP" newstring=".PP"/>
+  <!-- * remove any .sp instances that directly follow a .PP  -->
   <ss:substitution oldstring=".PP&#10;.sp" newstring=".PP"/>
   <!-- * squeeze multiple newlines after start of no-fill (verbatim) env. -->
   <ss:substitution oldstring=".nf&#10;&#10;" newstring=".nf&#10;"/>