Since you can set any arbitrary attribute value (and yes, that includes values that you define) to a constraint expression or use it in a constraint, there are a lot of possibilities.
由于可以为约束表达式设置任何任意的属性值(包括您自己定义的值),或者在约束中使用它,因此存在很多可能。
The schema constraint count(key('ids', .)) = 1 checks the set of all identifiers to be sure that only one has the current value (in other words whether the identifier is unique).
模式将限定 count(key('ids', .) ) = 1 检查所有的标识符,从而确保只有一个包含当前值(换句话说,确定该标识符是否是惟一的)。
Now you set the store ID and supplier ID fields so that they do not accept an empty value. Of course, you can add a schema constraint into the XForms model to achieve this.
现在,设置store ID和supplier ID字段以使这两个字段不接受空值。
应用推荐