]> granicus.if.org Git - docbook-dsssl/commitdiff
Deal with *info correctly & remove some kruft.
authorMichael Smith <xmldoc@users.sourceforge.net>
Wed, 29 Jun 2005 09:07:10 +0000 (09:07 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Wed, 29 Jun 2005 09:07:10 +0000 (09:07 +0000)
xsl/manpages/general.xsl
xsl/manpages/info.xsl

index 52b21cdec0ac1a7a5f93f44239ebbe316e472318..c5f12bab1aa62af4ba8829274936515f7a4a7fb1 100644 (file)
@@ -13,9 +13,6 @@
 
      ******************************************************************** -->
 
-<xsl:param name="man.subheading.divider"
->========================================================================</xsl:param>
-
 <!-- ==================================================================== -->
 
 <!-- * This file contains named and "non element" templates that are -->
index ea824d1e078683ebbb6e16570bc0ce18111e433e..86338eb6741a244554d6e1f9ca213333e544b06e 100644 (file)
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="info|articleinfo|bookinfo|refentryinfo" mode="authorsect">
+  <!-- * Match only the direct *info children of Refentry, along with -->
+  <!-- * any *info for the valid direct parents of Refentry -->
+  <xsl:template match="info|refentryinfo|referenceinfo
+                       |articleinfo|chapterinfo|sectioninfo
+                       |sect1info|sect2info|sect3info|sect4info|sect5info
+                       |partinfo|prefaceinfo|appendixinfo|docinfo"
+                mode="authorsect">
     <xsl:text>.SH "</xsl:text>
     <xsl:call-template name="string.upper">
       <xsl:with-param name="string">
     </xsl:call-template>
     <xsl:text>"&#10;</xsl:text>
 
-    <xsl:for-each select=".//author">
+    <xsl:for-each select=".//author" >
       <xsl:if test="position() > 1">
         <xsl:text>, </xsl:text>
       </xsl:if>
-      <xsl:apply-templates select="."/>
+      <xsl:apply-templates select="." mode="authorsect"/>
     </xsl:for-each>
     <xsl:text>. &#10;</xsl:text>
     <xsl:if test=".//editor">
       <xsl:text>.br&#10;</xsl:text>
-      <xsl:apply-templates select=".//editor"/>
+      <xsl:apply-templates select=".//editor" mode="authorsect"/>
       <xsl:text>. (man page)&#10;</xsl:text>
     </xsl:if>
     <xsl:for-each select="address">
     </xsl:for-each>
   </xsl:template>
 
-  <xsl:template match="author|editor">
+  <xsl:template match="author|editor" mode="authorsect">
     <xsl:call-template name="person.name"/>
     <xsl:if test=".//email">
       <xsl:text> </xsl:text>
-      <xsl:apply-templates select=".//email"/>
+      <xsl:apply-templates select=".//email" mode="authorsect"/>
     </xsl:if>
   </xsl:template>
 
-  <xsl:template match="email">
+  <xsl:template match="email" mode="authorsect">
     <xsl:text>&lt;</xsl:text>
     <xsl:apply-templates/>
     <xsl:text>&gt;</xsl:text>
   </xsl:template>
 
+  <!-- * ============================================================== -->
+
+  <!-- * suppress all *info (we grab what we need from it elsewhere -->
+  <xsl:template match="info|refentryinfo|referenceinfo|refsynopsisdivinfo
+                       |refsectioninfo|refsect1info|refsect2info|refsect3info
+                       |articleinfo|chapterinfo|sectioninfo
+                       |sect1info|sect2info|sect3info|sect4info|sect5info
+                       |partinfo|prefaceinfo|appendixinfo|docinfo"/>
+
 </xsl:stylesheet>