Eliminated trailing spaces.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@201912 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2005-06-26 21:43:34 +00:00
parent ce75526e14
commit 3524bd6ca6
1 changed files with 15 additions and 15 deletions

View File

@ -77,27 +77,27 @@ NEW FEATURES
kludge to re-insert line feeds removed by parser. Assumes new lines all
start with three or more leading spaces.
-->
<xsl:variable name="pad" select="' '"/>
<xsl:template name="keep.breaks">
<xsl:variable name="pad" select="' '"/>
<xsl:template name="keep.breaks">
<xsl:param name="input"/>
<xsl:if test="string-length($input) &gt; 0">
<xsl:choose>
<xsl:when test="contains($input,$pad)">
<xsl:variable name="init" select="normalize-space(substring-before($input,$pad))"/>
<xsl:variable name="term" select="substring-after($input,$pad)"/>
<xsl:if test="string-length($input) &gt; 0">
<xsl:choose>
<xsl:when test="contains($input,$pad)">
<xsl:variable name="init" select="normalize-space(substring-before($input,$pad))"/>
<xsl:variable name="term" select="substring-after($input,$pad)"/>
<xsl:if test="string-length($init) &gt; 0">
<xsl:value-of select="$init"/><xsl:value-of select="$CRLF"/>
</xsl:if>
</xsl:if>
<xsl:if test="string-length($term) &gt; 0">
<xsl:call-template name="keep.breaks">
<xsl:with-param name="input" select="$term"/>
</xsl:call-template>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space($input)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space($input)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
</xsl:stylesheet>