]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bug where simpara in footnote didn't work. Patch by Jonathan Nieder, jrnieder...
authorNorman Walsh <ndw@nwalsh.com>
Tue, 6 Jul 2010 20:57:06 +0000 (20:57 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Tue, 6 Jul 2010 20:57:06 +0000 (20:57 +0000)
xsl/manpages/block.xsl
xsl/manpages/endnotes.xsl

index d662979c1ef7dee5a373db5df642cc95c89c3a17..74f809eeeb7f1521fc530864692301c0798234c6 100644 (file)
 </xsl:template>
 
 <xsl:template match="simpara">
-  <xsl:if test="not(ancestor::authorblurb)
-    and not(ancestor::personblurb)
-    and not(ancestor::callout)"
-    >
-    <xsl:text>.sp&#10;</xsl:text>
-  </xsl:if>
+  <xsl:choose>
+    <xsl:when test="ancestor::footnote or
+                    ancestor::annotation or
+                    ancestor::authorblurb or
+                    ancestor::personblurb or
+                    ancestor::callout">
+      <xsl:if test="preceding-sibling::*[not(name() ='')]">
+        <xsl:text>.sp</xsl:text>
+        <xsl:text>&#10;</xsl:text>
+        <xsl:text>.RS 4n</xsl:text>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:if>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>.sp</xsl:text>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
   <xsl:variable name="content">
     <xsl:apply-templates/>
   </xsl:variable>
index 857c2b0f18f9f4d6e48dc92e077f61be2b6c2390..9a2a433cbd4998ae449ecd5706dfe5ebe2fb52ee 100644 (file)
           <!-- * do some further checking on it, so we can emit warnings -->
           <!-- * about potential problems -->
         <xsl:for-each select="node()">
-          <xsl:if test="local-name() != 'para' and local-name() !=''">
+          <xsl:if test="local-name() != 'para' and
+                        local-name() != 'simpara' and
+                        local-name() !=''">
             <!-- * for each node we find as a child of a footnote or -->
             <!-- * annotation, if it's not a para or a text node, emit a -->
             <!-- * warning... because in manpages output, we can't render -->