]> granicus.if.org Git - docbook-dsssl/commitdiff
To create the name(s) for each man page, we now replace any spaces
authorMichael Smith <xmldoc@users.sourceforge.net>
Fri, 29 Feb 2008 08:51:42 +0000 (08:51 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Fri, 29 Feb 2008 08:51:42 +0000 (08:51 +0000)
in the refname(s) with underscores. This ensures that tools like
lexgrog(1) will be able to parse the name (lexgrog won't parse
names that contain spaces).

xsl/manpages/refentry.xsl

index fa07eb0d6e2b3f7043998badfd773c2aacffd0b8..7f09e1256a023ee1f3755bbf94a0283fd0d91b1c 100644 (file)
       <xsl:if test="position()>1">
         <xsl:text>, </xsl:text>
       </xsl:if>
-      <xsl:value-of select="."/>
+      <xsl:call-template name="string.subst">
+        <!-- * To create the name(s) for this man page, replace any -->
+        <!-- * spaces in the refname(s) with underscores. This ensures -->
+        <!-- * that tools like lexgrog(1) will be able to parse the name -->
+        <!-- * (lexgrog won’t parse names that contain spaces). -->
+        <xsl:with-param name="string" select="."/>
+        <xsl:with-param name="target" select="' '"/>
+        <xsl:with-param name="replacement" select="'_'"/>
+      </xsl:call-template>
     </xsl:for-each>
     <!-- * The man(7) man pages says: -->
     <!-- * -->