Orbeon Forms:使用带有 xPath 的操作的 IF/THEN/ELSE 语句

huangapple go评论86阅读模式
英文:

Orbeon Forms: IF/THEN/ELSE Statement using Actions with xPath

问题

我在这个帖子中尝试了这两个 IF 语句,但都不起作用。

但是,如果删除 type="xpath" 语句(参见表单),它们可以正常工作。

那么,如何在具有 type="xpath" 语句的情况下使用动作:

  • 在动作头中使用 If/then/else
  • 在动作体中使用 If/then/else

一个简单的示例将会很有帮助。

非常感谢

PeteA

英文:

I tried both of these IF statements in this post, but neither work.

However, they do work OK if you remove the type="xpath" statement ( see this form).

So how can you use an action with the type="xpath" statement with:

  • If/then/else in the action header
  • If/then/else in action body

A simple example would be great.

Many thanks in advance

PeteA

答案1

得分: 2

那些示例不应该包含 type="xpath" 属性。我只是从答案中移除了这些属性,以避免可能的混淆。

type="xpath" 属性用于指定在 xf:action 上运行服务器端 XPath 脚本。这在使用具有副作用的扩展函数时特别有用。您可以在 调用服务器端 XPath 部分找到更多信息。

英文:

Those examples shouldn't have had that type="xpath" attribute. I just removed those attributes from that answer to avoid possible confusion.

The type="xpath" attribute on an xf:action is used to specify that the action should run a server-side XPath script. This is particularly useful when using extension functions that have side effects. You can find more about this in the section Calling server-side XPath.

huangapple
  • 本文由 发表于 2023年5月17日 23:45:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76273923.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定