]> granicus.if.org Git - docbook-dsssl/commitdiff
Added support for man.subheading.divider parameter.
authorMichael Smith <xmldoc@users.sourceforge.net>
Wed, 29 Jun 2005 06:50:25 +0000 (06:50 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Wed, 29 Jun 2005 06:50:25 +0000 (06:50 +0000)
xsl/manpages/block.xsl
xsl/manpages/general.xsl
xsl/manpages/other.xsl
xsl/manpages/param.ent
xsl/manpages/param.xweb
xsl/manpages/refentry.xsl

index 053522decc0e20199ad47f3d7a4183863464a279..7da45d2a7bd070ad02b60a9fe5b0122ea379f6a3 100644 (file)
 
 <xsl:template match="caution|important|note|tip|warning">
   <xsl:call-template name="nested-section-title"/>
-  <xsl:text>&#10;</xsl:text>
   <xsl:apply-templates/>
 </xsl:template> 
 
 <xsl:template match="formalpara">
   <xsl:call-template name="nested-section-title"/>
-  <xsl:text>&#10;</xsl:text>
   <xsl:text>.RS 3&#10;</xsl:text>
   <xsl:apply-templates/>
   <xsl:text>.RE&#10;</xsl:text>
 </xsl:template>
 
 <xsl:template match="address|literallayout|programlisting|screen|synopsis">
-  <!-- Yes, address and synopsis are verbatim environments. -->
+  <!-- Yes, address and synopsis are verbatim environments. -->
 
   <xsl:choose>
-    <!-- Check to see if this verbatim item is within a parent element that -->
-    <!-- allows mixed content. -->
-    
-    <!-- If it is within a mixed-content parent, then a line break is -->
-    <!-- already added before it by the mixed-block template, so we don't -->
-    <!-- need to add one here. -->
-    
-    <!-- If it is not within a mixed-content parent, then we need to add a -->
-    <!-- line break before it. -->
+    <!-- Check to see if this verbatim item is within a parent element that -->
+    <!-- allows mixed content. -->
+    <!-- * -->
+    <!-- If it is within a mixed-content parent, then a line break is -->
+    <!-- already added before it by the mixed-block template, so we don't -->
+    <!-- need to add one here. -->
+    <!-- * -->
+    <!-- If it is not within a mixed-content parent, then we need to add a -->
+    <!-- line break before it. -->
     <xsl:when test="parent::caption|parent::entry|parent::para|
                     parent::td|parent::th" /> <!-- do nothing -->
     <xsl:otherwise>
index 7f50a267ceb411b8e65bfe03295c348af71d7788..52b21cdec0ac1a7a5f93f44239ebbe316e472318 100644 (file)
@@ -13,6 +13,9 @@
 
      ******************************************************************** -->
 
+<xsl:param name="man.subheading.divider"
+>========================================================================</xsl:param>
+
 <!-- ==================================================================== -->
 
 <!-- * This file contains named and "non element" templates that are -->
         </xsl:otherwise>
       </xsl:choose></bold>
     </xsl:variable>
+    <xsl:call-template name="mark.subheading"/>
     <xsl:apply-templates mode="bold" select="exsl:node-set($title.wrapper)"/>
+    <xsl:text>&#10;</xsl:text>
+    <xsl:call-template name="mark.subheading"/>
   </xsl:template>
-
+  
   <!-- ================================================================== -->
 
   <!-- * The mixed-block template jumps through a few hoops to deal with -->
     </xsl:choose>
   </xsl:template>
 
+  <!-- ================================================================== -->
+  
+  <!-- * Put a horizontal rule or other divider around section titles -->
+  <!-- * in roff source (just to make things easier to read). -->
+  <xsl:template name="mark.subheading">
+    <xsl:if test="$man.subheading.divider != ''">
+      <xsl:text>.\" </xsl:text>
+      <xsl:value-of select="$man.subheading.divider"/>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:if>
+  </xsl:template>
+  
 </xsl:stylesheet>
index 2988ae35012233cb138631255a8e217867279ce7..449910b93e4a5034ff7130532f323945ca968286 100644 (file)
@@ -72,6 +72,7 @@
     <xsl:param name="extra2"/>
     <xsl:param name="extra3"/>
 
+    <xsl:call-template name="mark.subheading"/>
     <xsl:text>.TH "</xsl:text>
     <xsl:call-template name="string.upper">
       <xsl:with-param name="string">
@@ -88,6 +89,7 @@
     <xsl:text>" "</xsl:text>
     <xsl:value-of select="normalize-space($extra3)"/>
     <xsl:text>"&#10;</xsl:text>
+    <xsl:call-template name="mark.subheading"/>
   </xsl:template>
 
   <!-- ============================================================== -->
index 1e98f58ab12b3c9a5e03d257127740894535ba2b..a26f5bb72b19d58bc83863d88f0a85908b00dd66 100644 (file)
@@ -6,6 +6,7 @@
 <!ENTITY man.string.subst.map SYSTEM "../params/man.string.subst.map.xml">
 <!ENTITY man.charmap.enabled SYSTEM "../params/man.charmap.enabled.xml">
 <!ENTITY man.charmap.use.subset SYSTEM "../params/man.charmap.use.subset.xml">
+<!ENTITY man.charmap.uri SYSTEM "../params/man.charmap.uri.xml">
 <!ENTITY man.charmap.subset.profile SYSTEM "../params/man.charmap.subset.profile.xml">
+<!ENTITY man.subheading.divider SYSTEM "../params/man.subheading.divider.xml">
 <!ENTITY man.th.title.max.length SYSTEM "../params/man.th.title.max.length.xml">
-<!ENTITY man.charmap.uri SYSTEM "../params/man.charmap.uri.xml">
\ No newline at end of file
index bdf2d414375cf60214d53fd0c1792001bc589943..ab6abe18ca9bbc7ae93d350dfebadb8e7cb3a6f3 100644 (file)
@@ -36,6 +36,7 @@
 &man.output.quietly;
 &man.output.encoding;
 &man.string.subst.map;
+&man.subheading.divider;
 &man.th.title.max.length;
   </reference>
   <reference id="charmap">
@@ -78,6 +79,7 @@
 <src:fragref linkend="man.charmap.uri.frag"/>
 <src:fragref linkend="man.charmap.use.subset.frag"/>
 <src:fragref linkend="man.charmap.subset.profile.frag"/>
+<src:fragref linkend="man.subheading.divider.frag"/>
 <src:fragref linkend="man.th.title.max.length.frag"/>
 </xsl:stylesheet>
     </src:fragment>
index 3a9bb334495ba109670688ceee46120c439388e3..3c102313bb361842fd504d0a0395c32cab99e8d5 100644 (file)
@@ -20,6 +20,7 @@
         <!-- no title on secondary refnamedivs! -->
       </xsl:when>
       <xsl:otherwise>
+        <xsl:call-template name="mark.subheading"/>
         <xsl:text>.SH "</xsl:text>
         <xsl:call-template name="string.upper">
           <xsl:with-param name="string">
@@ -32,6 +33,7 @@
       </xsl:otherwise>
     </xsl:choose>
     <xsl:text>&#10;</xsl:text>
+    <xsl:call-template name="mark.subheading"/>
     <xsl:for-each select="refname">
       <xsl:if test="position()>1">
         <xsl:text>, </xsl:text>
@@ -44,6 +46,7 @@
   </xsl:template>
 
   <xsl:template match="refsynopsisdiv">
+    <xsl:call-template name="mark.subheading"/>
     <xsl:text>.SH "</xsl:text>
     <xsl:call-template name="string.upper">
       <xsl:with-param name="string">
       </xsl:with-param>
     </xsl:call-template>
     <xsl:text>"&#10;</xsl:text>
+    <xsl:call-template name="mark.subheading"/>
     <xsl:apply-templates/>
   </xsl:template>
 
   <xsl:template match="refsect1|refentry/refsection">
+    <xsl:call-template name="mark.subheading"/>
     <xsl:text>.SH "</xsl:text>
     <xsl:call-template name="string.upper">
       <xsl:with-param name="string" select="title"/>
     </xsl:call-template>
     <xsl:text>"&#10;</xsl:text>
+    <xsl:call-template name="mark.subheading"/>
     <xsl:apply-templates/>
   </xsl:template>
 
   <xsl:template match="refsect2|refentry/refsection/refsection">
+    <xsl:call-template name="mark.subheading"/>
     <xsl:text>.SS "</xsl:text>
     <xsl:value-of select="title[1]"/>
     <xsl:text>"&#10;</xsl:text>
+    <xsl:call-template name="mark.subheading"/>
     <xsl:apply-templates/>
   </xsl:template>
 
   <xsl:template match="refsect3|refsection">
     <xsl:call-template name="nested-section-title"/>
-    <xsl:text>&#10;</xsl:text>
     <xsl:text>.RS 3&#10;</xsl:text>
     <xsl:apply-templates/>
     <xsl:text>.RE&#10;</xsl:text>