删除; #xsl值中的字符和数字(人/人组) - itemsyle.xsl [英] remove ;# characters and number from xsl value (person /People group)- itemsyle.xsl

查看:85
本文介绍了删除; #xsl值中的字符和数字(人/人组) - itemsyle.xsl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我检索这样


<预类= "x_x_default x_x_prettyprint x_x_prettyprinted"> <跨度类= "PLN" > < xsl:call-template 名称 < span class ="pun"> = " RemoveHtml" >
< xsl:with-param name = " String" 选择 = " @ Person.title" />
< / xsl:call-template>

结果如下所示:
Neill @ uxxx.com33Field @ uxxx.com


如何删除号码" ; 33"并用空格或逗号替换。


提前致谢

解决方案

您好,


该号码是用户ID。您可以在用户信息列表中查看用户ID。


从字符串中删除";#"和用户ID ,您可以尝试以下XSLT:

< xsl:call-template name =" tokenize"> 

< xsl:with-param name =" String"选择= QUOT;翻译(@person,"#","")" />

< / xsl:call-template>



< xsl:template name =" tokenize">

< xsl:param name =" String" />

< xsl:param name =" delimiter"选择= QUOT;";"" />

< xsl:choose>

< xsl:当test =" contains(


String,


delimiter)并包含(substring-后(

I'm retrieving like this

 <xsl:call-template name="RemoveHtml">
           <xsl:with-param name="String" select="@Person.title"/>
       </xsl:call-template>

Result looks like this
Neill@uxxx.com33Field@uxxx.com

How can i remove the number "33" and replace with space or comma.

Thanks in advance

解决方案

Hi,

The number is the User Id. You can check the User Id in the User Information List.

To remove ";#" and User Id from the string, you can try the following XSLT:

<xsl:call-template name="tokenize">

                <xsl:with-param name="String" select="translate(@Person,'#','')"/>

</xsl:call-template>



<xsl:template name="tokenize">

    <xsl:param name="String"/>

    <xsl:param name="delimiter" select="';'"/>

    <xsl:choose>

        <xsl:when test="contains(


String,


delimiter) and contains(substring-after(


这篇关于删除; #xsl值中的字符和数字(人/人组) - itemsyle.xsl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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