XSL 从文本中删除换行符 [英] XSL Remove a line break from text

查看:43
本文介绍了XSL 从文本中删除换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想删除所有显示查看附件

notepadd++ 中显示的不需要的换行符:

Unwanted linebreak as shown in notepadd++:

替代文字 http://img13.imageshack.us/img13/9803/clcflinebreak.png

这是我目前所拥有的:

<xsl:template match="p">
<!-- output everything but the See the exhibit text should have the line break removed -->

</xsl:template>

有什么想法吗?谢谢!

推荐答案

        <!-- Get text. Replace all "break with " -->
        <xsl:variable name="linebreak">
            <xsl:text>
</xsl:text>
        </xsl:variable>
        <xsl:variable name="text">
            <xsl:call-template name="replace-string">
                <xsl:with-param name="text" select="."/>
                <xsl:with-param name="replace" select="concat('"',$linebreak)" />
                <xsl:with-param name="with" select="string('"')"/>
            </xsl:call-template>
        </xsl:variable>


        <xsl:value-of select="$text"/>

这篇关于XSL 从文本中删除换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆