XForms 数据类型参考手册
字符串数据类型
Name |
Description |
ID |
表示 ID 属性的字符串 |
IDREF |
表示 IDREF 属性的字符串 |
IDREFS |
|
language |
包含有效语言标识符的字符串(例如 en, en-US) |
Name |
包含有效 XML 名称的字符串 |
NCName |
|
NMTOKEN |
表示 NMTOKEN 属性的字符串 |
NMTOKENS |
|
normalizedString |
不包含换行符或制表符的字符串 |
QName |
|
string |
一个字符串。这是XForms将使用的默认数据类型,如果没有指定
未指定数据类型。 注意:字符串可能包含制表符和
换行字符 |
token |
不包含换行符、回车符的字符串
返回、制表符、前导或尾随空格,或多个空格 |
所有字符串数据类型都源自于 string 数据类型本身。
日期和时间数据类型
Name |
Description |
date |
定义日期值 |
dateTime |
定义日期和时间值 |
gDay |
定义日期的一部分 - 日期(DD) |
gMonth |
定义日期的一部分 - 月(MM) |
gMonthDay |
定义日期的一部分 - 月和日(MM-DD) |
gYear |
定义日期的一部分 - 年(CCYY) |
gYearMonth |
定义日期的一部分 - 年和月(CCYY-MM) |
time |
定义一个时间值 |
数值数据类型
Name |
Description |
byte |
一个有符号8位整数 |
decimal |
一个十进制值 |
int |
一个有符号32位整数 |
integer |
一个整数值 |
long |
一个有符号64位整数 |
negativeInteger |
一个仅包含负值的整数(..,-2,-1) |
nonNegativeInteger |
一个仅包含非负值的整数(0,1,2,..) |
nonPositiveInteger |
一个仅包含非正值(..,-2,-1,0)的整数 |
positiveInteger |
一个仅包含正值的整数(1,2, ..) |
short |
一个包含仅正值的整数(1,2, ..) |
unsignedLong |
一个无符号64位整数 |
unsignedInt |
一个无符号32位整数 |
unsignedShort |
一个无符号16位整数 |
unsignedByte |
一个无符号8位整数 |
所有数值数据类型都源于十进制数据类型。
Miscellaneous Data Types
Name |
Description |
anyURI |
Represents a URI, which includes web page addresses |
base64Binary |
Allows characters, including control characters, that
are otherwise not representable in XML |
boolean |
Defines a true/false or 1/0 value |
double |
|
float |
|
hexBinary |
|
XForms Data Type
Name |
Description |
listItems |
Represents a whitespace-separated list |
listItem |
Represents only non-whitespace characters. An excellent base type for a whitespace-separated list |
dayTimeDuration |
Represents a duration of a certain number of seconds |
yearMonthDuration |
Represents a duration of a certain number of months |