Show TOC

Background documentationData Types in the Enterprise Services Repository Locate this document in the navigation structure

 

Data type is an interface object that defines the structure of data in message types in the ES Repository. They contain elements and properties for the type definition. Data types are defined using XML Schema Definition Language (XSDL).

There are different classifications of data types in the ES Repository:

  • Core Data Types and Aggregated Data Types

    The specification XML Naming and Design Rules by the United Nations for Trade Facilitation and Electronic Business (UN/CEFACT XML NDR) describes how syntax-free components, which have been developed according to ISO 15000-5 Core Components Technical Specification (CCTS), are represented systematically in XML schema and XML instances. Core data types and aggregated data types are defined according to these standards. In addition to the language elements of XML schema, the data type editor also has attributes for the definition of the data types that comply with CCTS. These can be evaluated when the data type is used elsewhere. This, together with the governance process for data types simplifies the development of cross-company processes and the development of user interfaces, for example.

  • Freely-Modeled Data Type

    Freestyle data types support XML schema only.

Message types in the ES Repository can reference freestyle data types, core data types, and aggregated data types.

XML schema is the basis for the description of data types, regardless of the selected classification. The following sections describe some of the basic concepts.

XSD 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.

Elements and Attributes

To describe complex data types in XML schema, 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 that the same attribute cannot be used more than once in an element.

Frequently Occurring Elements

XML schema does not recognize tables but permits instead the definition of elements that can occur frequently in a schema (maxOccurs=unbounded). Depending on the target language, proxy generation generates either a table type with a structure for the line type (ABAP), or class for accessing using a list (Java).

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. For example:

  • 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)

More information: XSD Editor for Freely-Modeled Data Types

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. For this reason, the following restrictions exist for the use of data types (more information: Object References):

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

Caution Caution

You cannot structure data types recursively, that is, references of type   Datatype_1   Datatype_1   and transitive references of type   Datatype_1   Datatype_2   Datatype_1   are not permitted.

End of the caution.

More Information

Developing Data Types