interreality.org [VOS]
[Home][About]
[Screenshots][Download]
[News][Community]
[Documentation][Manual]
[Bugs & Requests][Wiki]

C.2. Primitive type

For smaller, singular values, one of a number of "primitive" datatype identifiers may be used. These conventionally correspond to variable types in a programming language. Note that the numeric primitives indicate that the number has been stored in the property as ASCII text (e.g. using printf). Future extensions may be used to indicate binary values stored in the property.

The primitive datatype identifiers are a subset of the same identifiers used in XML Schema. The current set follows; other types may be added in the future:

int

An integer value not exceeding 2147483647 or -2147483648 (as an ASCII string with each character containing a digit or the minus sign)

unsignedInt

A non-negative integer value not exceeding 4294967295 (as an ASCII string with each character containing a digit or the minus sign)

long

An integer value not exceeding 9223372036854775807 or -9223372036854775808 (as an ASCII string with each character containing a digit or the minus sign)

unsignedLong

A non-negative integer value not exceeding 18446744073709551615 (as an ASCII string with each character containing a digit or the minus sign)

short

An integer value not exceeding 32767 or -32768 (as an ASCII string with each character containing a digit or the minus sign)

unsignedShort

A non-negative integer value not exceeding 65535 (as an ASCII string with each character containning a digit or the minus sign)

float

A floating point (real) number not exceeding 6 places of precision in its fractional part as an ASCII character string (with each character containing a digit). float corresponds to a 32 bit IEEE floating point number, and must be between -1.17549 ⋅ 1038 and 3.402823 ⋅ 1038 ???. 0, -0, INF (infinity), -INF (negative infinity) and NaN (not a number) may also be used. Scientific notation is supported by appending "e" or "E" followed the base-10 exponent. Negative numbers are indicated by prepending a '-' character; positive numbers by prepending a '+' character or omitting the sign.

double

A floating point (real) number not exceeding 12 ??? places of precision. double corresponds to a 64-bit IEEE floating point number and must be between -2.225074 ⋅ 10308 and 1.797693 ⋅ 10308 ???. 0, -0, INF (infinity), -INF (negative infinity) and NaN (not a number) may also be used. Scientific notation is supported by appending "e" or "E" followed the base-10 exponent. Negative numbers are indicated by prepending a '-' character; positive numbers by prepending a '+' character or omitting the sign.

boolean

Either the value true or the value false

string

Any string text, but typically a short string from a fixed set of possible values.

dateTime

A value with dateTime datatype has the format CCYY-MM-DDThh:mm:ssZZZ where "CC" represents the century, "YY" the year, "MM" the month and "DD" the day. The letter "T" is the date/time separator and "hh", "mm", "ss" represent hour, minute and second respectively. "ZZZ" represents the time zone (UTC if omitted). Additional digits can be used to increase the precision of fractional seconds if desired e.g the format ss.sss... with any number of digits after the decimal point is supported. The fractional seconds part is optional; other parts of the lexical form are not optional. To accommodate year values greater than 9999 additional digits can be added to the left of this representation. Leading zeros are required if the year value would otherwise have fewer than four digits; otherwise they are forbidden. The year 0000 is prohibited.

The CCYY field must have at least four digits, the MM, DD, SS, hh, mm and ss fields exactly two digits each (not counting fractional seconds); leading zeroes must be used if the field would otherwise have too few digits.

(This description is a modified excerpt from [XSD].

anyURI

Any URI as defined in [RFC 2396] and [RFC 2732].

Further property value contstraints may be added to the datatype in an Object Type Definition (OTD) [XXX add cross reference]