Primitive data types

The following primitive data types are used:

xsd:string

Any required sequence of characters according to the XML specification. The characters < and & are to be replaced with the entities &lt; and &amp; or CDATA sections are to be applied.

xsd:normalizedString

Like xsd:string, but the characters 'carriage return'(#xD), 'linefeed'(#xA) and 'tabulator'(#x9) must not occur.

xsd:anyURI

For representing URIs (uniform resource identifier).

xsd:decimal

For representing rational numbers in decimal notation, e.g. 123.45. The decimal places are separated by a point.

xsd:integer

Limitation of xsd:decimal to integers, i.e. without a decimal point and places.

xsd:date

Represented here is a date in the format yyyy-mm-dd, i.e. 2005-05-30 in the case of 30th May 2005. A time zone can be specified optionally.

xsd:dateTime

Represented here is a time in the format yyyy-mm-ddThh:mm:ss, i.e. 2005-05-30T14:30:00 in the case of 30th May 2005, 14:30 hours. Fractions of a second and a time zone can be specified optionally.

xsd:boolean

Indicator with two possible values: true or false. Valid serializations: true, false, 0, 1.

 

This serves to derive:

cbc:AmountType

For indicating monetary amounts. Simple content of type xsd:decimal. The amountCurrencyID attribute is required. Implementations must use the buyer or seller's local currency. Example:

<UnitPrice amountCurrencyID="EUR">12.45</UnitPrice>

Though indication of currency might seem extremely redundant, it is a consequence of the generality of UBL.

cbc:DateType

For representing a date. Simple content of type xsd:date. Time zones are not to be used.

cbc:DateTimeType

For representing a time. Simple content of type xsd:dateTime. Time zones and fractions of a second are not to be used.

udt:TextType

For representing any required text. Simple content of type xsd:string; languageID as optional attribute, currently not used.

cbc:IndicatorType

Indicator of two possible states. Simple content of type xsd:boolean. If an element of this type is optional, then its absence in a document instance is equivalent to the occurrence of that element with false content.

udt:NumericType

 For representing numbers. Content of type xsd:decimal.