XML Schema to Business Object Model Import Mappings

During the import process XML Schema data types (defined at http://www.w3.org/TR/xmlschema-2/) are mapped to the existing primitive Business Object Model data types with appropriate restrictions. In many cases there is no direct mapping and consequently the closest match is made.

XSD data type Mapping to Business Object Model primitive type
xsd:gDay Text

The following pattern is used to ensure valid formatting:

\-\-\-(0[1-9]|[12][0-9]|3[01])(|Z|[+-](0[0-9]|[1][0-3]):(0[0-9]|[12345][0-9]))
xsd:gMonth Text

The following pattern is used to ensure valid formatting:

\-\-(0[1-9]|[1][0-2])(|Z|[+-](0[0-9]|[1][0-3]):(0[0-9]|[12345][0-9]))

xsd:gMonthDay Text

The following pattern is used to ensure valid formatting:

\-\-(0[1-9]|[1][0-2])\-(0[1-9]|[12][0-9]|3[01])(|Z|[+-](0[0-9]|[1][0-3]):(0[0-9]|[12345][0-9]))

xsd:gYear Text

The following pattern is used to ensure valid formatting:

(\-\d{4,}|\d{4,})(|Z|[+-](0[0-9]|[1][0-3]):(0[0-9]|[12345][0-9]))

xsd:gYearMonth Text

The following pattern is used to ensure valid formatting:

(\-\d{4,}|\d{4,})(|Z|[+-](0[0-9]|[1][0-3]):(0[0-9]|[12345][0-9]))\-(0[1-9]|[1][0-2])(|Z|[+-](0[0-9]|[1][0-3]):(0[0-9]|[12345][0-9]))

xsd:IDREF Text

The following pattern is used to ensure valid formatting:

[\i-[:]][\c-[:]]*

xsd:IDREFS Text

A stereotype is used to indicate the original IDREFS type, but no pattern is enforced.

xsd:language Text

The following pattern is used to ensure valid formatting:

([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*

xsd:Name Text

The following pattern is used to ensure valid formatting:

\i\c*

xsd:NCName Text

The following pattern is used to ensure valid formatting:

[\i-[:]][\c-[:]]*

xsd:NMTOKEN Text

A stereotype is used to indicate the original NMTOKEN type. The following pattern is used to ensure valid formatting:

\c+

xsd:NMTOKENS Text

A stereotype is used to indicate the original NMTOKENS type, but no pattern is enforced.

xsd:normalizedString Text

The following pattern is used to ensure that tab, linefeed and return characters are replaced by spaces:

[^\t\n\r]+

xsd:QName Text

The following pattern is used to ensure valid formatting:

([\\i-[:]][\\c-[:]]*:)?[\\i-[:]][\\c-[:]]*

xsd:string Text
xsd:ENTITY Text.

The following pattern is used to ensure valid formatting:

[\i-[:]][\c-[:]]

xsd:anyType This is mapped to a non-typed attribute or primitive type.
xsd:anySimpleType This is mapped to a non-typed attribute or primitive type.
xsd:token Text

The following pattern is used to ensure valid formatting:

\c+([ ]\c+)*

xsd:boolean Boolean
xsd:base64Binary Text
xsd:hexBinary Attachment

The following pattern is used to ensure valid formatting:

([0-9a-fA-F][0-9a-fA-F])*

xsd:byte Integer

The following pattern is used to ensure valid formatting:

minInclusive = -128
maxInclusive = 127

xsd:unsignedByte Integer

The following restrictions are applied:

minInclusive = 0
maxInclusive = 255

xsd:integer Integer

A stereotype is used to indicate the original xsd:integer type.

xsd:long A Fixed Integer subtype of the Integer primitive type.

The following restrictions are applied:

minInclusive = -9223372036854775808
maxInclusive = 9223372036854775807

xsd:negativeInteger Fixed Integer

The following restrictions are applied:

maxInclusive = -1

xsd:nonNegativeInteger Fixed Integer

The following restrictions are applied:

minInclusive = 0

xsd:nonPositiveInteger Fixed Integer

The following restrictions are applied:

maxInclusive = 0

xsd:positiveInteger Fixed Integer

The following restrictions are applied:

minInclusive = 1

xsd:short Integer

The following restrictions are applied:

minInclusive = -32768
maxInclusive = 32767

xsd:unsignedInt Fixed Integer

The following restrictions are applied:

minInclusive = 0
maxInclusive = 4294967295

xsd:unsignedLong Fixed Integer

The following restrictions are applied:

minInclusive = 0
maxInclusive = 18446744073709551615

xsd:unsignedShort Fixed Integer

The following restrictions are applied:

minInclusive = 0
maxInclusive = 65535

xsd:int A Signed Integer subtype of the Integer primitive type.

The following restrictions are applied:

minInclusive = -2147483648
maxInclusive = 2147483647

xsd:float A Floating Point subtype of the Decimal primitive type.

The following restrictions are applied:

minInclusive = -3.4028235E38
maxInclusive = 3.4028235E38

xsd:double A Fixed Point subtype of the Decimal primitive type.

The following restrictions are applied:

minInclusive = -1.7976931348623157E308
maxInclusive = 1.7976931348623157E308

xsd:anyURI URI
xsd:date Date
xsd:time Time
xsd:dateTime DateTime
xsd:duration Duration
xsd:ID Text

The following pattern is used to ensure valid formatting:

[\i-[:]][\c-[:]]*

(Note that this is the same pattern as for xsd:NCName.)

xsd:mixed Boolean