相关疑难解决方法(0)

找不到XSLT替换功能

我正在编写一个XSLT转换,我希望使用Replace函数进行正则表达式匹配和替换.

但是,Visual Studio 2008报告了这一点

'replace()'是一个未知的XSLT函数.

代码本身就是:

<xsl:otherwise>
    <td style="border: solid 1px black; background-color:#00CC66;">
          <xsl:variable name="FeatureInfo" select="Text" />
                <xsl:value-of select="replace($FeatureInfo,'Feature=','TESTING')"/>
     </td>
 </xsl:otherwise>
Run Code Online (Sandbox Code Playgroud)

有什么我做错了吗?

谢谢 :)

编辑:我正在使用这个版本的XSLT,但看起来它是Visual Studio的版本是一个问题......我将不得不尝试找到一个解决方法.

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Run Code Online (Sandbox Code Playgroud)

regex xml xslt xpath replace

14
推荐指数
3
解决办法
3万
查看次数

标签 统计

regex ×1

replace ×1

xml ×1

xpath ×1

xslt ×1