Toggle navigation

XForms 数据类型 参考手册

完整的 XForms Data Types 参考手册。

字符串数据类型

名称描述
IDA string that represents the ID attribute
IDREFA string that represents the IDREF attribute
IDREFS 
languageA string that contains a valid language id (e.g. en, en-US)
NameA string that contains a valid XML name
NCName 
NMTOKENA string that represents the NMTOKEN attribute
NMTOKENS 
normalizedStringA string that does not contain new line characters or tabs
QName 
stringA string. This is the default data type XForms will use if no data type is specified.

Note: string may contain tab characters and new line characters

tokenA string that does not contain line feeds, carriage returns, tabs, leading or trailing spaces, or multiple spaces

所有的字符串数据类型都源自于 string 数据类型本身。

日期和时间数据类型

名称描述
dateDefines a date value
dateTimeDefines a date and time value
gDayDefines a part of a date - the day (DD)
gMonthDefines a part of a date - the month (MM)
gMonthDayDefines a part of a date - the month and day (MM-DD)
gYearDefines a part of a date - the year (CCYY)
gYearMonthDefines a part of a date - the year and month (CCYY-MM)
timeDefines a time value

数值数据类型

名称描述
byteA signed 8-bit integer
decimalA decimal value
intA signed 32-bit integer
integerAn integer value
longA signed 64-bit integer
negativeIntegerAn integer containing only negative values (..,-2,-1)
nonNegativeIntegerAn integer containing only non-negative values (0,1,2,..)
nonPositiveIntegerAn integer containing only non-positive values (..,-2,-1,0)
positiveIntegerAn integer containing only positive values (1,2, ..)
shortA signed 16-bit integer
unsignedLongAn unsigned 64-bit integer
unsignedIntAn unsigned 32-bit integer
unsignedShortAn unsigned 16-bit integer
unsignedByteAn unsigned 8-bit integer

All numeric data types are derived from the decimal data type.

杂项数据类型

名称描述
anyURIRepresents a URI, which includes web page addresses
base64BinaryAllows characters, including control characters, that otherwise aren't representable in XML
booleanDefines a true/false or 1/0 value
double 
float 
hexBinary 

XForms 数据类型

名称描述
listItemsRepresents a whitespace-separated list
listItemRepresents only non-whitespace characters. An excellent base type for a whitespace-separated list
dayTimeDurationRepresents a duration of a certain number of seconds
yearMonthDurationRepresents a duration of a certain number of months