Normalize text-only endnotes properly.
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 19 Jun 2007 12:54:53 +0000 (12:54 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 19 Jun 2007 12:54:53 +0000 (12:54 +0000)
xsl/manpages/endnotes.xsl

index 39a2f81a2737518530121555fb6fcd655d11c8d6..2b44d8cc1ece327b5edd564bb473186128a95b5d 100644 (file)
         <!-- * its corresponding notesource is either a link or -->
         <!-- * an instance of annotative text, so we want to -->
         <!-- * display that content -->
-        <xsl:apply-templates select="*/node()"/>
+        <xsl:choose>
+          <xsl:when test="*/node()[name(.)!='']">
+            <xsl:apply-templates select="*/node()"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="normalize-space(*/node())"/>
+          </xsl:otherwise>
+        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
         <!-- * otherwise, this earmark has empty content, -->