]> granicus.if.org Git - docbook-dsssl/commitdiff
Made handling of Refnamediv consistent with formatting in HTML and
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 6 Apr 2006 14:06:45 +0000 (14:06 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 6 Apr 2006 14:06:45 +0000 (14:06 +0000)
manpages output; specifically, changed so that Refname
(comma-separated list of multiple instances found) is used
(instead of Refentrytitle as previously), then em-dash, then the
Refpurpose. Closes #1212562.

xsl/fo/refentry.xsl

index 11d1699c8d0e026640025ae6ed520a5105a7b37f..412855ae962abb55ef4b1be8a68cd89aba6d8b08 100644 (file)
       <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"/>
-        </xsl:when>
-       <xsl:when test="refdescriptor">
-          <xsl:apply-templates select="refdescriptor[1]"/>
-       </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="refname[1]"/>
-        </xsl:otherwise>
-      </xsl:choose>
-      <xsl:apply-templates select="refpurpose"/>
-    </fo:block>
-
-    <!-- what was this for?
-    <fo:block>
-      <xsl:choose>
-       <xsl:when test="refdescriptor">
-         <xsl:apply-templates select="refdescriptor"/>
-       </xsl:when>
-       <xsl:otherwise>
-         <xsl:for-each select="refname">
-           <xsl:apply-templates select="."/>
-           <xsl:if test="following-sibling::refname">
-             <xsl:text>, </xsl:text>
-           </xsl:if>
-         </xsl:for-each>
-       </xsl:otherwise>
-      </xsl:choose>
+      <xsl:apply-templates/>
     </fo:block>
-    -->
   </fo:block>
 </xsl:template>
 
 <xsl:template match="refname">
-  <xsl:apply-templates/>
+  <xsl:if test="not(preceding-sibling::refdescriptor)">
+    <xsl:apply-templates/>
+    <xsl:if test="following-sibling::refname">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+  </xsl:if>
 </xsl:template>
 
 <xsl:template match="refpurpose">