xslt - 或条件在 xslt 中不起作用,如果

标签 xslt

<xsl:when test="person/id!=127 or 112" >

或者条件在上面的例子中不起作用。请帮忙

最佳答案

你的语法有误,应该是and,而不是or。试试这个:

<xsl:when test="person/id!=127 and person/id!=112" >

如果你在此处放置一个or,那么无论 ID 的值是什么,你的条件都将是true,因为没有数字可以等于 127 和 112同时。

关于xslt - 或条件在 xslt 中不起作用,如果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13139257/

相关文章:

java - Servlet 无法从 AJAX 调用中检索参数

xslt - 使用 xpath-default-namespace 定义在 XSL XPath 中使用的默认命名空间

c# - Xsl 转换剪切两个 <xsl :value-of select's 之间的空间

css - 如何在 xsl 文件中应用 URL 和 Quote 标记的 css 样式?

xslt - 搜索祖先或 self 轴以找到第一个非空属性值

xslt - 从 xslt 在 href 中传递多个参数

xml - 使用 XSL 读取包含文件

xslt - 使用 XSLT 向标签添加属性

xslt - 在 apply-templates 模式下使用变量的值

xml - 如何转换 XML 文档具有命名空间的 xsl