]> granicus.if.org Git - docbook-dsssl/commitdiff
Don't output punctuation between Refname and Refpurpose if
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 10 Aug 2006 22:42:16 +0000 (22:42 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 10 Aug 2006 22:42:16 +0000 (22:42 +0000)
Refpurpose is empty. Also corrected handling of Refsect2/title
instances, and removed some debugging stuff that was generated in
manpages output to mark the ends of sections.

xsl/fo/refentry.xsl
xsl/html/refentry.xsl
xsl/manpages/refentry.xsl

index 953001ce8f52dca2b360ce7eeae293a61511bc38..48ff5525537879a84d13f929e2f1cb5424198dc3 100644 (file)
 </xsl:template>
 
 <xsl:template match="refpurpose">
-  <xsl:text> </xsl:text>
-  <xsl:call-template name="dingbat">
-    <xsl:with-param name="dingbat">em-dash</xsl:with-param>
-  </xsl:call-template>
-  <xsl:text> </xsl:text>
-  <xsl:apply-templates/>
+  <xsl:if test="node()">
+    <xsl:text> </xsl:text>
+    <xsl:call-template name="dingbat">
+      <xsl:with-param name="dingbat">em-dash</xsl:with-param>
+    </xsl:call-template>
+    <xsl:text> </xsl:text>
+    <xsl:apply-templates/>
+  </xsl:if>
 </xsl:template>
 
 <xsl:template match="refdescriptor">
index 9b894c7dca3879dc188b8114d7b14cc14ff7f9ec..ca75e7fd6ac1f677ff7ea08004aa70ca0812ecf4 100644 (file)
 </xsl:template>
 
 <xsl:template match="refpurpose">
-  <xsl:text> </xsl:text>
-  <xsl:call-template name="dingbat">
-    <xsl:with-param name="dingbat">em-dash</xsl:with-param>
-  </xsl:call-template>
-  <xsl:text> </xsl:text>
-  <xsl:apply-templates/>
+  <xsl:if test="node()">
+    <xsl:text> </xsl:text>
+    <xsl:call-template name="dingbat">
+      <xsl:with-param name="dingbat">em-dash</xsl:with-param>
+    </xsl:call-template>
+    <xsl:text> </xsl:text>
+    <xsl:apply-templates/>
+  </xsl:if>
 </xsl:template>
 
 <xsl:template match="refdescriptor">
index 9475c1c28002996a1cf3c2aa63c0bf44b0d05942..5811c350fa8d02a9d510c86509bb0510ccdff8d3 100644 (file)
     <!-- * So why don't we precede the hyphen with a backslash here? -->
     <!-- * Well, because it's added later, by the apply-string-subst-map -->
     <!-- * template, before we generate final output -->
-    <xsl:text> - </xsl:text>
-    <xsl:value-of select="normalize-space (refpurpose)"/>
+    <xsl:if test="refpurpose/node()">
+      <xsl:text> - </xsl:text>
+      <xsl:value-of select="normalize-space(refpurpose)"/>
+    </xsl:if>
     <xsl:text>&#10;</xsl:text>
   </xsl:template>
 
   <xsl:template match="refsect2|refentry/refsection/refsection">
     <xsl:call-template name="mark.subheading"/>
     <xsl:variable name="title">
-      <xsl:value-of select="(info/title
-                            |refsectioninfo/title
-                            |refsect1info/title
-                            |title)[1]"/>
+      <xsl:apply-templates
+          select="(info/title
+                  |refsectioninfo/title
+                  |refsect1info/title
+                  |title)[1]/node()"/>
+      
     </xsl:variable>
     <xsl:text>.SS "</xsl:text>
-    <xsl:value-of select="$title"/>
+    <xsl:value-of select="normalize-space($title)"/>
     <xsl:text>"&#10;</xsl:text>
     <xsl:call-template name="mark.subheading"/>
     <xsl:choose>
         <xsl:apply-templates/>
       </xsl:otherwise>
     </xsl:choose>
-    <xsl:text>.\" end of SS subsection "</xsl:text>
-    <xsl:value-of select="$title"/>
-    <xsl:text>"&#10;</xsl:text>
   </xsl:template>
 
   <xsl:template match="refsect3|refentry/refsection/refsection/refsection">
         <xsl:apply-templates/>
       </xsl:otherwise>
     </xsl:choose>
-    <xsl:text>.\" end of subsection "</xsl:text>
-    <xsl:value-of select="$title"/>
-    <xsl:text>"&#10;</xsl:text>
   </xsl:template>
 
   <xsl:template match="refsection">
     <xsl:text>.RS (\n(SNu)&#10;</xsl:text>
     <xsl:apply-templates/>
     <xsl:text>.RE&#10;</xsl:text>
-    <xsl:text>.\" end of subsection "</xsl:text>
-    <xsl:value-of select="$title"/>
-    <xsl:text>"&#10;</xsl:text>
   </xsl:template>
 
   <!-- ==================================================================== -->