I am having this below variable
<xsl:variable name="testvar">
d
e
d
</xsl:variable>
and I have this function:
<xsl:choose>
<xsl:when test="not($str-input)">
<func:result select="false()"/>
</xsl:when>
<xsl:otherwise>
<func:result select="translate($str-input,$new-line,'_')"/>
</xsl:otherwise>
</xsl:choose>
</func:function>
And when I tested the function I saw my result is like this: _ d _ e _ d_ and I want my result to be only
d _ e _ d
Can you change your variable to:
?
In XSLT 1.0:
returns:
The spaces are part the variable value. You could remove them using
normalize-space()
, but since I don't know what"d"
or"e"
is in reality I leave them unchanged.