我有这个低于可变XSLT 1.0:替换为新行字符_
<xsl:variable name="testvar">
d
e
d
</xsl:variable>
,我有这样的功能:
<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>
当我测试我看到的功能我结果是这样的:_ d _ e _ d_ 并且我希望我的结果仅为
d _ _êd
@Tomalak 我有一个问题。你只有变量: 如何回车“\ r”。 我不确定在ded后是否有回车(\ r) d \ r \ n或d \ n \ r e \ r \ n或e \ n \ r d \ r \ n或d \ n \ r xsl:variable> –
2009-09-29 15:03:23
更改' '期待在你的价值中出现。例如,'select =''
'''也可以。 –
Tomalak
2009-09-29 15:11:40
或者,你可以使用'translate($ str,' ','')''去除任何出现' '的东西 - 无论你认为合适的措施。 – Tomalak 2009-09-29 15:13:52