当前位置: 首页 > 网络学院 > XML相关教程 > XForms > XForms 属性

XForms
XForms 介绍
XForms 模型
XForms 命名空间
XForms 实例
XForms XPath
XForms 输入控件
XForms 选择控件
XForms 数据类型
XForms 属性
XForms 行为(Actions)
XForms 函数
Xforms 数据类型参考

XForms 属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 590 ::
收藏到网摘: n/a

XForms properties define data restrictions, types and behaviors.
XForms 属性可定义数据限定,类型和行为。


XForms Properties
XForms 属性

XForms uses properties to define restrictions (or other attributes) that can affect the behavior of XForms controls.
XForms 使用属性来定义可影响 XForms 控件的行为的限定(或其他属性)。

Examples:

A required="true()" property will not allow the specified instance data to be submitted as an empty value.
required="true()"属性不允许指定的实例数据提交时为空值。

A type="decimal" property will only allow a decimal value to be submitted.
type="decimal"属性只允许提交十进制数值。

A calculate property can calculate a value for the instance data.
Calculate属性可以计算实例数据的值。

Please refer to the properties reference at the bottom of this page.
请参照本页下方的属性参考。


Binding Properties To Data
把属性捆绑到数据

XForms uses the <bind> element to bind XForms properties to XForms data:
XForms 可使用 <bind> 元素把 XForms 属性绑定到 XForms 数据:

<model>
<instance>

<person>
<fname/>
??<lname/>
??</person>
??</instance>
??<bind nodeset="person/lname" required="true()"/>

</model>

In the example above, the attribute nodeset="person/lname" binds the property required="true()" to the instance data element <lname>.
在上面的例子中,属性 nodeset="person/lname" 可把属性 required="true()" 绑定到实例数据元素 <lname>。


XForms Properties Reference
XForms 属性参考

Name
名称
Description
描述
calculate Defines a calculation to be performed on the item
定义对项目执行的计算。
constraint Defines a constraint for the item
定义一个约束
p3ptype Defines a P3P data type for the item
为项目定义 P3P 数据类型。
readonly Defines an edit restriction for the item (cannot be changed)
为项目定义一个编辑限定(edit restriction)(无法修改)
relevant Defines how relevant the data is (for display or submission)
定义数据如何相关联。(供显示还是提交)
required Defines if data item is required (cannot be blank)
定义数据项目是必需项目。(不能为空)
type Defines the data type for the item
为项目定义数据类型。

评论 (0) All

登陆 | 还没注册?