我在代码中使用XSLT 2.0的字符映射功能时遇到错误。
元素'样式表'在命名空间' http://www.w3.org/1999/XSL/Transform'具有无效的子元素' character-map'在命名空间' http://www.w3.org/1999/XSL/Transform'
这是我的XSLT声明
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:character-map name="a">
<xsl:output-character character="'" string="&apos;"/>
</xsl:character-map>
<xsl:output indent="yes" use-character-maps="a"/>
请帮助我们了解如何在XSLT中使用字符映射。
答案 0 :(得分:0)
正如评论中所提到的,您的问题的答案是您需要使用XSLT 2.0处理器,因为您的样式表使用XSLT 2.0构造。 .NET中的Microsoft处理器是XSLT 1.0处理器。各种第三方XSLT 2.0处理器可用于.NET平台。