
In ES Repository, Data Type is an object, containing the structure of data that defines the message. You use these messages when there is an exchange of data during web service communication (point-to-point) or in Integration Server communication. You define a data type using XML Schema Definition Language (XSDL).
In ES Repository, you can create freestyle, core, and aggregated data types.
Core and Aggregated Data Types
Core and aggregated data types are based on Core Components Technical Specification (CCTS) specification and are the basis for application-specific data types accepted across the businesses.
Address is considered to be an aggregate data type and any field of address like postal code is considered to be a core data type.
Free-style Data Types
Free-style data types are based on the primitive data types and they do not need any further parameters to define themselves.
Decimal, String, Integer and so on.
Data Type Categories
XML schema has the following data type categories:
|
Category |
Meaning |
Examples |
|
Built-In Type |
Built-in data types are part of the XML schema language and have the prefix xsd . (They can also be subdivided into primitive and derived data types, but this is not important in the definition of data types). XML schema defines a value range for each built-in data type. |
xsd:string xsd:decimal xsd:integer |
|
Simple Type |
Simple data types refine built-in data types, for example, by limiting the length of a string or by specifying a specific value range. Like built-in data types, they do not contain any further elements. |
<simpleType name=germanPhoneNumber base=string> <pattern value=?\d{4}?/?\d{6} /> </simpleType> |
|
Complex Type |
Data types that can contain further elements and attributes. Elements and attributes can in turn reference built-in, simple, complex, or global data types. This enables large complex data types to be structured using smaller complex data types. |
<complexType name=person> <element name=firstname type=string /> <element name=lastname type=string /> </complexType> |
|
Complex Type with SimpleContent |
Complex types with simpleContent are data types with a root element that has a textual XSD type (for example, xsd:string), but that otherwise only have attributes and subelements. |
XML schema does not recognize tables but permits the definition of elements that can occur frequently in a schema (maxOccurs=unbounded).
Elements and Attributes
To describe data types in XML schema, you use elements and attributes:
|
Node Type |
Use |
Example Instance |
|
Element |
Create structured data types. Elements that have a type cannot contain subelements. |
<myElem> <f1> Value of f1 </f1> <f2> Value of f2 </f2> </myElem> |
|
Attribute |
Add attributes to elements. Attributes cannot usually have subnodes. |
<myElem myAttr =" AttributeValue "># Element Value #</myElem> |
The difference between elements and attributes is that attributes cannot have any subnodes, and you cannot use the same attribute more than once in an element.
Facets
Facets enable you to restrict the value range of a data type in XML schema to a particular subset. This enables you to determine exactly which value is expected in a special case for a simple data type, an element, or an attribute.
A telephone number (using a pattern on a string)
A selection of permitted values, for example to classify the different classes for a flight (using an enumeration)
Referencing of Data Types
You can structure data types in a nested way by referencing data types from a complex data type. However, you must ensure that the referencing and the referenced data type are shipped together, otherwise the data type definition is not complete.
|
Category |
Can Be Referenced In |
|---|---|
|
Built-In Type |
All software component versions |
|
Simple Type |
The same software component version or a sub-software component version of the referencing freestyle data type. |
|
Complex Type |
The same software component version or a sub-software component versions of the referencing freestyle data type. |
|
Core Data Type |
The same software component version or a sub-software component version of the referencing aggregated data type |
|
Aggregated Data Type |
The same software component version or a sub-software component version of the referencing aggregated data type |
You cannot structure data types recursively, that is, references of type and transitive references of type are not permitted.