【发布时间】:2018-08-16 09:11:49
【问题描述】:
我是 XSLT 的新手,我有一个条件可以根据 XSLT 中应用的条件从 XML 文件中删除一个元素。我必须根据同一属性的 2 个条件删除 en 元素。
这是我的虚拟代码:
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="cdm:attributeList/cdm:attribute[cdm:attributeName = 'format'] and cdm:attributeList/cdm:attribute[cdm:attributeValue = 'XYZ']" />
在运行 XSLT 文件时出现以下错误: 1. 额外的非法标记:'and' 2. xsl:output 元素上不允许有“exclude-result-prefixes”属性!
有人可以帮我解决这个问题吗? 谢谢。
【问题讨论】:
-
您能否在运行代码的位置显示输入 XML?
标签: xslt-1.0