A simple type is a structure that represents a simple value only.
Simple types are data structures like strings, numbers, and booleans. They can also be customized with facets so that only a certain range of numbers, or a certain set of codes, for example, are allowed.
Simple types can be used in two ways in the model:
- Core defines attribute
personNameInitialIndicator
. Its type is a boolean - a simple type.- Core defines simple type
AddressCategoryCodeSimpleType
, which constrains a string down to a few possible codes, likeresidential
andbusiness
.
Common simple types provided by XML include xs:string
, xs:token
, xs:date
, xs:date-time
, xs:integer
, xs:decimal
, and xs:boolean
.
Simple types provided by JSON are string
, integer
, decimal
, and boolean
. Dates are simply strings in JSON, but if they follow the format set by ISO 8601, they can be converted into dates in JavaScript.
In addition to a simple type with facets, NIEM supports two additional kinds of simple types: