]> granicus.if.org Git - docbook-dsssl/commitdiff
Added person.name.normalized template to cause contents of author,
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 22 Aug 2006 05:03:46 +0000 (05:03 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 22 Aug 2006 05:03:46 +0000 (05:03 +0000)
editor, etc., names to be normalized. Also added normalization in
several others places in *info output that lacked it. Thanks to
Daniel Leidert.

xsl/manpages/info.xsl
xsl/manpages/utility.xsl

index d2f3fd454108189314156c0f959e486be78efcae..dc6999f7754287b39690f256a1ad53e904dc264e 100644 (file)
         <!-- * Otherwise, this node is not a Collab, but instead -->
         <!-- * an author|editor|othercredit, which must have a name -->
         <!-- * of some kind; so get that name -->
-        <xsl:call-template name="person.name"/>
+        <xsl:call-template name="person.name.normalized"/>
       </xsl:otherwise>
     </xsl:choose>
     <xsl:if test=".//email|address/otheraddr/ulink">
   
   <xsl:template match="author|editor|othercredit" mode="authorsect">
     <xsl:variable name="person-name">
-      <xsl:call-template name="person.name"/>
+      <xsl:call-template name="person.name.normalized"/>
     </xsl:variable>
     <!-- * If we have a person-name or email or ulink content, then -->
     <!-- * output name and email or ulink content on the same line -->
     <xsl:text>&lt;\&amp;</xsl:text>
     <xsl:choose>
       <xsl:when test="self::email">
-        <xsl:apply-templates/>
+        <xsl:variable name="contents">
+          <xsl:apply-templates/>
+        </xsl:variable>
+        <xsl:value-of select="normalize-space($contents)"/>
       </xsl:when>
       <xsl:when test="self::ulink">
-        <xsl:apply-templates select="."/>
+        <xsl:variable name="contents">
+          <xsl:apply-templates select="."/>
+        </xsl:variable>
+        <xsl:value-of select="normalize-space($contents)"/>
       </xsl:when>
     </xsl:choose>
     <xsl:text>\&amp;&gt;</xsl:text>
 
   <xsl:template match="personblurb/title|authorblurb/title">
     <!-- * always render period after title -->
-    <xsl:apply-templates/>
+    <xsl:variable name="contents">
+      <xsl:apply-templates/>
+    </xsl:variable>
+    <xsl:value-of select="normalize-space($contents)"/>
     <xsl:text>.</xsl:text>
     <!-- * render space after Title+period if the title is followed -->
     <!-- * by something element content -->
         <!-- * the copyright mode="titlepage.mode" template is -->
         <!-- * imported from the HTML stylesheets -->
         <xsl:for-each select="(($info[//copyright])[last()]//copyright)">
-          <xsl:apply-templates select="." mode="titlepage.mode"/>
+          <xsl:variable name="contents">
+            <xsl:apply-templates select="." mode="titlepage.mode"/>
+          </xsl:variable>
+          <xsl:value-of select="normalize-space($contents)"/>
           <xsl:text>&#10;.br&#10;</xsl:text>
         </xsl:for-each>
         <xsl:text>&#10;</xsl:text>
index d6492cd88c72026d49676b907d8ae356a6ae8ad6..65e5babe30250efbad01d7a6cbc2080ee779702e 100644 (file)
 
   <!-- ================================================================== -->
 
+  <xsl:template name="person.name.normalized">
+    <xsl:variable name="contents">
+      <xsl:call-template name="person.name"/>
+    </xsl:variable>
+    <xsl:value-of select="normalize-space($contents)"/>
+  </xsl:template>
+
+  <!-- ================================================================== -->
+
   <xsl:template name="make.adjusted.man.filename">
     <xsl:param name="name"/>
     <xsl:param name="section"/>