Datatypes

Runtime integer tags for supported datatypes with conversion to/from URIs.

enum ExessDatatype
enumerator EXESS_NOTHING

Sentinel for unknown datatypes or errors.

enumerator EXESS_BOOLEAN

xsd:boolean (see Boolean)

enumerator EXESS_DECIMAL

xsd:decimal (see Decimal)

enumerator EXESS_DOUBLE

xsd:double (see Double)

enumerator EXESS_FLOAT

xsd:float (see Float)

enumerator EXESS_INTEGER

xsd:integer (see Long)

enumerator EXESS_NON_POSITIVE_INTEGER

xsd:nonPositiveInteger (see Long)

enumerator EXESS_NEGATIVE_INTEGER

xsd:negativeInteger (see Long)

enumerator EXESS_LONG

xsd:long (see Long)

enumerator EXESS_INT

xsd:integer (see Int)

enumerator EXESS_SHORT

xsd:short (see Short)

enumerator EXESS_BYTE

xsd:byte (see Byte)

enumerator EXESS_NON_NEGATIVE_INTEGER

xsd:nonNegativeInteger (see Unsigned Long)

enumerator EXESS_ULONG

xsd:unsignedLong (see Unsigned Long)

enumerator EXESS_UINT

xsd:unsignedInt (see Unsigned Int)

enumerator EXESS_USHORT

xsd:unsignedShort (see Unsigned Short)

enumerator EXESS_UBYTE

xsd:unsignedByte (see Unsigned Byte)

enumerator EXESS_POSITIVE_INTEGER

xsd:positiveInteger (see Unsigned Long)

enumerator EXESS_DURATION

xsd:duration (see Duration)

enumerator EXESS_DATETIME

xsd:dateTime (see Datetime)

enumerator EXESS_TIME

xsd:time (see Time)

enumerator EXESS_DATE

xsd:date (see Date)

enumerator EXESS_HEX

xsd:hexBinary (see Hex)

enumerator EXESS_BASE64

xsd:base64Binary (see Base64)

const char *exess_datatype_uri(ExessDatatype datatype)

Return the URI for a supported datatype.

This only returns URIs that start with http://www.w3.org/2001/XMLSchema#.

Parameters
  • datatype – Datatype tag.

Returns

The URI of the datatype, or null for ExessDatatype.EXESS_NOTHING.

ExessDatatype exess_datatype_from_uri(const char *uri)

Return the datatype tag for a datatype URI.

Returns

A datatype tag, or ExessDatatype.EXESS_NOTHING if the URI is not a supported datatype.

bool exess_datatype_is_bounded(ExessDatatype datatype)

Return whether a datatype has an upper bound on value sizes.

This returns true for all datatypes except ExessDatatype.EXESS_DECIMAL, ExessDatatype.EXESS_INTEGER and its half-bounded subtypes ExessDatatype.EXESS_NON_POSITIVE_INTEGER, ExessDatatype.EXESS_NEGATIVE_INTEGER, ExessDatatype.EXESS_NON_NEGATIVE_INTEGER, and ExessDatatype.EXESS_POSITIVE_INTEGER, and the binary types ExessDatatype.EXESS_HEX and ExessDatatype.EXESS_BASE64.

For bounded datatypes, the maximum length of the string representation is available in exess_max_lengths array, or as static constants like EXESS_MAX_INT_LENGTH.

Returns

True if values of the given datatype have a maximum size.