The generation of Natural DDMs from Tamino is based on the Tamino XML schema language. The basic concepts of the Tamino XML schema language and how it interacts with Natural for Tamino is described in Accessing Data in a Tamino Database in the Programming Guide.
This section describes the mapping of Tamino data types to Natural data formats.
The Tamino XML schema language provides a large number of built-in
data types that are mapped to the corresponding Natural data format, if
possible. In some cases no adequate Natural data format is available. Then
these Tamino data types are mapped to the most general Natural data format:
U (DYNAMIC)
. The data format U (DYNAMIC)
can hold any
Tamino XML schema built-in data type as the schema language is based on strings
of unlimited length.
The following tables show the built-in Tamino primitive and derived data types supported by Natural for Tamino and the corresponding Natural data formats to which they are mapped.
Tamino Primitive Data Type | Natural Data Format/Length |
---|---|
xs:string | U (DYNAMIC) |
xs:boolean | L |
xs:decimal | P22.7 |
xs:float | F4 |
xs:double | F8 |
xs:duration | U (DYNAMIC) |
xs:dateTime | U (DYNAMIC) |
xs:time | T |
xs:date | D |
xs:gYearMonth | U (DYNAMIC) |
xs:gYear | U (DYNAMIC) |
xs:gMonthDay | U (DYNAMIC) |
xs:gDay | U (DYNAMIC) |
xs:gMonth | U (DYNAMIC) |
xs:hexBinary | U (DYNAMIC) |
xs:base64Binary | U (DYNAMIC) |
xs:anyURI | U (DYNAMIC) |
xs:QName | U (DYNAMIC) |
xs:NOTATION | U (DYNAMIC) |
Tamino Derived Data Type | Natural Data Format/Length |
---|---|
xs:normalizedString | U (DYNAMIC) |
xs:token | U (DYNAMIC) |
xs:language | U (DYNAMIC) |
xs:NMTOKEN | U (DYNAMIC) |
xs:NMTOKENS | U (DYNAMIC) |
xs:Name | U (DYNAMIC) |
xs:NCName | U (DYNAMIC) |
xs:ID | U (DYNAMIC) |
xs:IDREF | U (DYNAMIC) |
xs:IDREFS | U (DYNAMIC) |
xs:ENTITY | U (DYNAMIC) |
xs:ENTITIES | U (DYNAMIC) |
xs:Integer | P29 |
xs:nonPositiveInteger | P29 |
xs:negativeInteger | P29 |
xs:long | P19 |
xs:int | I4 |
xs:short | I2 |
xs:byte | I2 |
xs:nonNegativeInteger | P29 |
xs:unsignedLong | P19 |
xs:unsignedShort | I2 |
xs:unsignedByte | I2 |
xs:unsignedInt | I4 |
xs:positiveInteger | P29 |
Tamino XML Schema constructors are used to define the structure of a document. Constructors can also be used to derive new data types from existing ones and to describe the nested structure of a document.
New Tamino XML Schema data types can be created by using a set of
derivation methods from existing data types. If the derivation cannot be mapped
to a Natural data format, Natural uses the most general data format U
(DYNAMIC)
instead.
The following table shows the Tamino XML schema constructors Natural supports and the attributes for each constructor. The Comment column describes the mapping, which is performed when a DDM is generated.
For restrictions concerning the use of XML schema constructors refer to the section Accessing Data in a Tamino Database in the Programming Guide.
Constructor | Attribute | Comment |
---|---|---|
xs:all |
minOccurs |
Is mapped to a Natural group structure. |
xs:attribute |
name |
Is mapped to a Natural group structure. |
xs:choice |
minOccurs |
Is mapped to a Natural group structure. |
xs:complexType |
name (only mixed=false supported) |
Is a meta constructor and therefore does not result in a Natural data type immediately. |
xs:element |
name |
Mapped to a Natural data type or to a Natural group,
depending on the xs:element sub-structures (simple or complex type
definition).
|
xs:enumeration | Is mapped to type U (DYNAMIC) .
|
|
xs:extension | base | Is a meta constructor and therefore does not result in a Natural data type immediately. |
xs:fractionDigits | value | Influences the precision of the Natural data type. |
xs:length | value | Influences the length of a Natural data type; a length
of unbounded is mapped to type U (DYNAMIC) .
|
xs:maxInclusive |
value | Does not influence the mapping (that is, the base type will not be restricted in any way). |
xs:maxLength | value | Influences the length of a Natural data type; a length
of unbounded is mapped to type U (DYNAMIC) .
|
xs:restriction | base | Is a meta constructor and therefore does not result in a Natural data type immediately. |
xs:schema |
attributeFormDefault |
Is a meta constructor and therefore does not result in a Natural data type immediately. |
xs:sequence |
minOccurs |
Is mapped to a Natural group structure. |
xs:simpleContent | Is a meta constructor and therefore does not result in a Natural data type immediately. | |
xs:simpleType | name | Is a meta constructor and therefore does not result in a Natural data type immediately. |
xs:totalDigits | value | Influences the length of a numeric Natural data type. |
The multiplicity feature in the Tamino XML schema language is
expressed by the attribute maxOccurs
of the
appropriate constructor. A maxOccurs
value
greater than 1
will result in an array definition in the Natural
DDM from Tamino. Depending on the value of
maxOccurs
, a static array (if
maxOccurs
is set to a number) or an X-Array (if
maxOccurs
is set to unbounded
) will
be generated in the DDM. As usual, the array definition can be overwritten when
defining a view from a DDM.