|
类 型 |
解 释 |
举 例 |
|---|---|---|
| boolean | 布尔型:0 或 1, 其中0代表false,1代表true | 0,1 |
| char | 单字符 | “a”、“b” |
| time | 时间类型,符合 ISO 8601格式, 无日期和时区部分。 | 08:16:18 |
| date | 日期类型,符合ISO 8601格式且无时间部分. | 2000-06-01 |
| dateTime | 日期类型,符合ISO 8601格式,带可选时间部分但无时区部分,秒可精确到纳秒级。 | 2000-06-01T20:08:18 |
| fixed.14.4 | 数值类型,同“number”类似,但精度上小数点前不超过14位,小数点后不超过4位 | 14.1234 |
| float | 实数类型,位数不受限制,可以包含符号位和小数位以及指数。取值范围从 1.7976931348623157E+308 至 2.2250738585072014E-308 | .314159265358979E+1 |
| int | 数值类型, 可以包含符号位,但不含小数位和指数位 | 1, -10, 2566 |
| number | 数值类型,位数不限,可以包含符号位和小数位以及指数。取值范围从 1.7976931348623157E+308 至 2.2250738585072014E-308 | 12, 3.1415, -1.24E-10 |
| uri | 统一资源标识(URI)类型。 |
http://www.ics. uci.edu /pub/ietf/uri/ |
元素和属性的数据类型可以使用元素datatype来定义,这个元素是Schema中一个重要元素,也是Schema的一大特色。datatype的语法表达如下:
| datatype | dt:type | |
|---|---|---|
| ElementType | <ElementType name="a"> <datatype dt:type=" float"> </ElementType> |
<ElementType name="a" dt:type="float"/> |
| AttributeType | <AttributeType name ="b"/> <datatype dt:type="float"/></AttributeType> <ElementType name="a"> <attribute type="b"/> </ElementType> |
<AttributeType name="b" dt:type="float"/> <ElementType name="a"> <attribute type="b"/> </ElementType> |