]> granicus.if.org Git - docbook-dsssl/commitdiff
Added support for processing refsection down to any arbitrary
authorMichael Smith <xmldoc@users.sourceforge.net>
Sun, 29 May 2005 00:29:09 +0000 (00:29 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Sun, 29 May 2005 00:29:09 +0000 (00:29 +0000)
level of nesting (closes #1210482).

xsl/manpages/general.xsl
xsl/manpages/refentry.xsl

index 23185f1cc6bb1afd28fb34a4d51edbc5fcd218a8..28a1003ad13eddf18568df500c0ab53384952706 100644 (file)
@@ -30,7 +30,7 @@
 
   <!-- for anything that gets boldfaced -->
   <xsl:template mode="bold" match="*">
-    <xsl:for-each select="child::node()">
+    <xsl:for-each select="node()">
       <xsl:text>\fB</xsl:text>
       <xsl:apply-templates select="."/>
       <xsl:text>\fR</xsl:text>
@@ -46,7 +46,6 @@
     </xsl:for-each>
   </xsl:template>
 
-
   <xsl:template name="nested-section-title">
     <xsl:text>.sp
 .it 1 an-trap
 .nr an-break-flag 1
 .br</xsl:text>
     <xsl:text>&#10;</xsl:text>
-    <xsl:call-template name="string.upper">
-      <xsl:with-param name="string">
-        <xsl:choose>
-          <xsl:when test="title">
-            <xsl:value-of select="normalize-space(title[1])"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:with-param>
-    </xsl:call-template>
+    <xsl:text>\fB</xsl:text>
+    <xsl:choose>
+      <xsl:when test="title">
+        <xsl:value-of select="normalize-space(title[1])"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>\fR</xsl:text>
   </xsl:template>
-  
-
 
   <!-- jump through a few hoops to deal with mixed-content blocks, so that -->
   <!-- we don't end up munging verbatim environments or lists and so that we -->
index 1fa73dd0fdc3fc73369b694f45f882a30b7340f6..7f53ff83045c4e4d637ca38fab9c622b8b04a56a 100644 (file)
     <xsl:apply-templates/>
   </xsl:template>
 
-  <xsl:template match="refsection|refsect1">
-    <xsl:choose>
-      <xsl:when test="ancestor::refsection">
-        <xsl:text>.SS "</xsl:text>
-        <xsl:value-of select="title[1]"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>.SH "</xsl:text>
-        <xsl:value-of
-            select="translate(title[1],
-                    'abcdefghijklmnopqrstuvwxyz',
-                    'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
-      </xsl:otherwise>
-    </xsl:choose>
+  <xsl:template match="refsect1|refentry/refsection">
+    <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:apply-templates/>
   </xsl:template>
 
-  <xsl:template match="refsect2">
+  <xsl:template match="refsect2|refentry/refsection/refsection">
     <xsl:text>.SS "</xsl:text>
     <xsl:value-of select="title[1]"/>
     <xsl:text>"&#10;</xsl:text>
     <xsl:apply-templates/>
   </xsl:template>
 
-  <xsl:template match="refsect3">
+  <xsl:template match="refsect3|refsection">
     <xsl:call-template name="nested-section-title"/>
     <xsl:text>&#10;</xsl:text>
     <xsl:text>.RS 3&#10;</xsl:text>