General Element Properties - 6.3

Talend Data Mapper User Guide

EnrichVersion
6.3
EnrichProdName
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend Studio

Each element has the following general properties.

Name

The name of the element. When using XML, this is the name that appears in the XML document. Names for XML can specify a namespace prefix refering to a namespace in the structure's associated namespace container. Specify the namespace prefix in the usual XML syntax of prefix:name.

Description

A short description of the element. This description appears on the same line as the name of the element. If the name of the element is sufficiently descriptive, this may be omitted (as is the case with many XML element names). However, for EDI, for example, the name of the element is not descriptive, so the description is included.

Occurs

Specifies the number of times this element may occur in a document. There are two values: minimum and maximum. For example, to require that the element occur at least once, set the minimum value to 1. If you do not want to restrict the maximum number of occurrences, set the maximum value to -1.

Following are the values for mandatory, optional, and loop elements:

 

Minimum

Maximum

Mandatory

1

1

Optional

0

1

Loop

0

-1

Size

Like Occurs, Size has a minimum and maximum value, which specifies the constraints on the number of characters in the element. Either value can take -1, which means its size is unconstrained. By default the size specification is -1 for the minimum and maximum. Specifying the element's size is useful if you use the validation feature.

Visible Group / Element tags do not appear in document

For grouping purposes it is often desirable to define elements that are part of the definition of the structure, but the element tags do not appear as part of the document (the element contents, i.e. the children of the element so). For example, suppose you want to specify that two XML elements repeat like this: <a/><b/><a/><b/>. To specify this, you create a non-visible group element that encloses a and b, and then set the maximum Occurs value to something greater than 1. Your element definition would look like this:

abHolder (non-visible group, loops)
    a
    b                   

When you import an XML Schema, several types of non-visible group elements are created, including the Attributes element, which holds the XML attributes of a given XML element. Having the XML attributes grouped under a single element makes it easier to work with the structure.

This is only meaningful for representations that support the notion of tagged elements like XML and in some cases EDI.

Null

Indicates this element can have a null value. This is possible only for XML, Java and database elements. See Null Value Support for more details.

Group Type

Indicates how the children of this element are grouped.

  • None - this element contains text only; it has no child elements that define additional structure.

  • Sequence - all children must occur (if they occur) in the order specified.

  • Choice - only one of the children can occur. If the element loops, a different child element can occur for each instance of the loop.

  • All - all of the elements must occur, and they can occur in any order.

Element Type

Defines how this element is used in a document. This is mostly relevant for XML documents, in which elements can manifest as XML elements, XML attributes, text, etc.

  • Standard - An element with no special treatment (e.g., a standard XML element). For XML documents, the value of the element refers to the value of all text included within the element, provided there are no child elements. When you want to access mixed content, you must use an element type of XML Text to access the text between the child XML elements.

  • XML Attribute - (XML documents only) The element appears as an XML attribute. Child elements of this type must be of type value.

  • XML Processing Instruction - (XML documents only) The element appears as an XML processing instruction. Elements of this type cannot have child elements.

  • XML Text - (XML documents only) This element accesses text values, which is necessary only when accessing text values for mixed XML content, where text is interleaved with XML elements. Elements of this type cannot have child elements.

  • Value - This element's name is used to match the text value of its enclosing element. This is used to define possible code values for validation and mapping purposes. An element will have a child element with element type of Value for each possible code value. Elements of this type cannot have child elements.

  • Any - The content of this element can be any collection of elements, which are completely unspecified. Elements of this type cannot have child elements.

Data Type

The data type defines the type of an element's text content. The data type applies only for elements with a group type of none. The following data types are defined:

  • String - A character string.

  • Byte - An unsigned 8-bit byte.

  • Short - A signed 16-bit quantity.

  • Integer - A signed 32-bit quantity.

  • Long - A signed 64-bit quantity.

  • Float - A 32-bit floating-point number.

  • Double - A 64-bit floating-point number.

  • Date/Time - A date and time value together. This includes the timezone information.

  • Date - A date value.

  • Time - A time value.

  • Duration - A duration of time. This is in the ISO 8601 format of PnYnMnDTnHnMnS. It must begin with a P, and the remaining capital letters identify the type of the period. The capital letters can be omitted when the corresponding period is not used. Examples: P4Y is 4 years; P6Y7M2D is 6 years, 7 months, and 2 days; P30S is 30 seconds.

  • Boolean - Either true or false.

  • Binary - A binary value.

  • QName - A qualified name with an optional prefix and local name. The prefix must be found in one of the namespace containers associated with the structure.

    Warning

    This is presently not to be used as an element data type, it is used only in the Constant function.

Data Format

The data format describes how the data type is to be concretely manifested. The default data format chooses the best format for the representation. For example, in the EDI representation the date data type and default format will choose the correct data format based on the date qualifier for input documents. The representation specifies the byte order to be used for the entire structure, so it is not necessary to specify the byte order data format individually. However, you can specify the byte order if you want to override it for a specific element.

The following data formats are defined (organized by the data types to which they apply):

  • Integers

    • Default - Numbers are encoded as specified in the representation.

    • Little Endian (PC) - Numbers are encoded in binary in little endian byte format as used by the Intel processors.

    • Big Endian - Numbers are encoded in binary in big endian byte format.

  • Decimal

    • Default - Numbers are encoded as specified in the representation.

    • Character - Numbers are encoded as ASCII characters.

    • Packed Decimal - Numbers are encoded in packed decimal.

    • Zoned Decimal - Number are encoded in zoned decimal.

  • Float/Double

    • Default - Values are encoded using the IEEE 754 standard.

    • IBM Floating Point - Values are encoded using the IBM 360 mainframe standard.

  • Date and Date/Time

    • Default - Dates are encoded as specified in the representation.

    • The remaining date and date/time formats use CC for century, YY for year of century, MM for numeric month of the year, MMM for text month (first 3 characters of the month in English), WW for week of year, W for weak of month, DD for day of month, and DDD for day of year. Other special designators are as noted. The week of year (WW) follows the ISO 8601 rules for week conversion. The date/time formats also use the abbreviations below for the Time type.

  • Time

    • Default - Encoded according to the rules for the representation.

    • The remaining time formats use HH for hour, MM for minute, SS for second and DD for tenth of second.

  • Binary

    • Default - Specifies that the data appears in binary format.

    • Base64 - Encoded into characters with base-64 encoding. (Not currently supported)

    • Hex - Encoded into characters with hex encoding. (Not currently supported)

  • String

    • String (null term) - A string whose value ends with a byte of 0.

When converting dates from an encoding with no century to encodings that require a century, the Java standard rules for deriving the century are followed, which put the year in the century that begins 80 years before the current date.

Decimal Places

This is used for numeric data to indicate the number of implied decimal positions. For example, if this value is 2, and the element contains the value 1234, the value of the element is 12.34.

Use Children Of

This is used to define a recursive element, which has the same content as its parent element. If an element is recursive, set the use children of property to the parent element.

Other Text Descriptions

The Text field allows you to provide complete documentation of the element and to facilitate capturing documentation from imported specifications like EDI. You can tag the text field with one of the following description types:

  • Comments - Comments about the element as specified in the imported structure definition.

  • Long Description - The long description about the element as specified in the imported structure definition.

  • Purpose - The purpose of the element as specified in the imported structure definition.

  • Semantics - The semantics of the element as specified in the imported structure definition.

  • User Notes - Notes about the usage of this element.

  • Example - Example values for this element. This is not to be confused with the use of sample/test documents that may be associated with the structure. The example values here serve only as documentation.