数据(用于 XML 窗体文档)

The Data tab page of the Properties dialog for an XML Form document offers some XML forms settings.

要访问此命令...

Open context menu of a selected control on an XML Form document, choose Control - Data tab.

Open Form Controls toolbar of an XML Form document, click Control icon - Data tab.


对于不同控件,数据选项卡页面中显示的设置也可能不同。您只能看到当前控件和上下文可以使用的选项。可以使用以下字段:

XML 数据模型

从当前文档中所有模型的列表中选择一个模型。

绑定

选择或输入绑定的名称。选择现有绑定的名称可以使该绑定与窗体控件关联。输入新名称可以创建新的绑定,并将其与窗体控件关联。

绑定表达式

Enter the DOM node to bind the control model to. Click the ... button for a dialog to enter the XPath expression.

必填

指定 XForm 中是否必须包括该项目。

相关

将项目声明为相关。

只读

将项目声明为只读。

约束

将项目声明为约束。

计算

声明项目已计算。

数据类型

选择一个数据类型,将按照该数据类型对控件进行验证。

x

选择用户定义的数据类型,单击该按钮可删除用户定义的数据类型。

+

单击该按钮将打开一个对话框,可以在该对话框中输入新的用户定义数据类型的名称。新的数据类型将继承当前选定数据类型的所有面。

批注图标

下面列出了对数据类型有效的所有面。某些面只能用于部分数据类型。


空格

Specifies how whitespaces are to be handled when a string of the current data type is being processed. Possible values are "Preserve", "Replace", and "Collapse". The semantics follow the definition at https://www.w3.org/TR/xmlschema-2/#rf-whiteSpace.

模式

Specifies a regular expression pattern. Strings validated against the data type must conform to this pattern to be valid. The XSD data type syntax for regular expressions is different from the regular expression syntax used elsewhere in LibreOffice, for example in the Find & Replace dialog.

位数(全部)

指定十进制数据类型的值可以具有的最大总位数。

位数(小数)

指定十进制数据类型的值可以具有的最大小数位数。

最大(包括)

指定值的上界(包括)。

最大(不包括)

指定值的上界(不包括)。

最小(包括)

指定值的下界(包括)。

最小(不包括)

指定值的下界(不包括)。

长度

指定字符串包含的字符数。

长度(最小)

指定字符串包含的最少字符数。

长度(最大)

指定字符串包含的最大字符数。