Skip to content

Commit

Permalink
better handling of whitespace after last author
Browse files Browse the repository at this point in the history
  • Loading branch information
HelenaSabel committed Sep 30, 2023
1 parent 2f74497 commit 65709ac
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions common/common_core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,14 @@ of this software, even if advised of the possibility of such damage.
<xsl:apply-templates select="if (tei:surname) then * else node()"/>
<xsl:call-template name="makeText">
<xsl:with-param name="letters">
<xsl:if test="not(ends-with(., '.')) and (if (child::*) then *[last()][not(ends-with(., '.'))] else true())">. </xsl:if>
<xsl:choose>
<xsl:when test="not(ends-with(., '.')) and (if (child::*) then *[last()][not(ends-with(., '.'))] else true())">
<xsl:text>. </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
Expand Down Expand Up @@ -320,9 +327,14 @@ of this software, even if advised of the possibility of such damage.
<xsl:choose>
<xsl:when test="ancestor::tei:biblStruct and not(preceding-sibling::tei:author)">
<xsl:apply-templates/>
<xsl:if test="not(ends-with(., '.')) and (if (child::*) then *[last()][not(ends-with(., '.'))] else true())">
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="not(ends-with(., '.')) and (if (child::*) then *[last()][not(ends-with(., '.'))] else true())">
<xsl:text>. </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:if test="not(self::tei:author[3])">
Expand All @@ -338,9 +350,14 @@ of this software, even if advised of the possibility of such damage.
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not(ends-with(., '.')) and (if (child::*) then *[last()][not(ends-with(., '.'))] else true())">
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="not(ends-with(., '.')) and (if (child::*) then *[last()][not(ends-with(., '.'))] else true())">
<xsl:text>. </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
Expand Down

0 comments on commit 65709ac

Please sign in to comment.