在 xslt 处理过程中计算 <p> 元素中的特定字母组合

问题描述 投票:0回答:1
xml string xslt count
1个回答
0
投票

&amp;
&quot;
都是字符,而不是单词。您可以使用以下方法计算当前节点中
&amp;
字符出现的次数:

<xsl:value-of select="string-length(replace(., '[^&amp;]', ''))"/>
© www.soinside.com 2019 - 2024. All rights reserved.