]> granicus.if.org Git - docbook-dsssl/commitdiff
Support multiple refnamedivs
authorNorman Walsh <ndw@nwalsh.com>
Wed, 19 Jan 2005 15:21:16 +0000 (15:21 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 19 Jan 2005 15:21:16 +0000 (15:21 +0000)
xsl/fo/refentry.xsl
xsl/html/refentry.xsl

index ef9a9f251cd7c3b49592cbfb23a98a2cada3ed8c..0e057e84282e8ac4e98d7b4f5992b1bfebe8ed55 100644 (file)
   <!-- xsl:use-attribute-sets takes only a Qname, not a variable -->
   <fo:block>
     <xsl:choose>
+      <xsl:when test="preceding-sibling::refnamediv">
+       <!-- no title on secondary refnamedivs! -->
+      </xsl:when>
       <xsl:when test="$section.level = 1">
         <fo:block xsl:use-attribute-sets="refentry.title.properties">
           <fo:block xsl:use-attribute-sets="section.title.level1.properties">
       </xsl:otherwise>
     </xsl:choose>
 
-    <fo:block space-after="1em">
+    <fo:block>
+      <xsl:if test="not(following-sibling::refnamediv)">
+       <xsl:attribute name="space-after">1em</xsl:attribute>
+      </xsl:if>
       <xsl:choose>
         <xsl:when test="../refmeta/refentrytitle">
           <xsl:apply-templates select="../refmeta/refentrytitle"/>
index 3fa0918d0790f050bef2812b668ad425a3565372..3c2831e5e1f0993362c35d104df20fd32c1991aa 100644 (file)
 <xsl:template match="refnamediv">
   <div class="{name(.)}">
     <xsl:call-template name="anchor"/>
+
     <xsl:choose>
+      <xsl:when test="preceding-sibling::refnamediv">
+       <!-- no title on secondary refnamedivs! -->
+      </xsl:when>
       <xsl:when test="$refentry.generate.name != 0">
         <h2>
           <xsl:call-template name="gentext">
         </h2>
       </xsl:when>
     </xsl:choose>
+
     <p>
       <xsl:apply-templates/>
     </p>