gpt4 book ai didi

orbeon - 在 XForms 中,如何使所有字段只读,除了少数字段?

转载 作者:行者123 更新时间:2023-12-04 06:08:21 26 4
gpt4 key购买 nike

我使用 Making an Entire Instance Read-Only 执行了以下操作以将整页设为只读。 :

<xforms:instance>
<form>
...
</form>
</xforms:instance>
<xforms:bind ref="instance('form-name')" readonly="true()"/>

但我需要启用几个字段。我尝试了为 Multiple binds on a given node 提供的这样一个代码但对于“必需”的属性。所以这失败了。
<xforms:bind ref="instance('form-name')/some-node" readonly="false()"/>

那么,是否可以仅针对几个节点覆盖表单实例的全局只读设置?

最佳答案

如您所述,绑定(bind) readonly="false()"没有效果,因为这是默认设置,并且根据管理 multiple binds on a given node 的规则,它不会覆盖另一个说此节点是只读的绑定(bind)。 .

但是,您可以编写一个绑定(bind),使实例中的所有叶元素(即不包含任何其他元素的元素: //*[empty(*)] )只读,特定元素除外。例如:

<xforms:bind ref="//*[empty(*)] except (/some/node, /some/other/node, …)"
readonly="true()"/>

关于orbeon - 在 XForms 中,如何使所有字段只读,除了少数字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8079818/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com