IBM Support

XML encoding and native schema Type Trees

Question & Answer


Question

Why am I unable to use 2 different encodings on the same native schema WebSphere Transformation Extender (WTX) type tree?

Cause

When using the same native XML type tree for multiple inputs, outputs, or as input and output, the encoding must be the same for all occurrences.

The native XML type tree uses the encoding as the Data Language for all the elements in that XML type tree. On input, the encoding is dynamically set by the value of “encoding” in the XML header, and on output it is the value that the user moves into encoding. If no value is present “UTF-8” is the default.

WTX uses the Data dictionary method of defining elements. This means that a particular element in a particular type tree is defined the same wherever it is used in a WTX map.

This is not an issue with a regular type tree since its data language is set when the map is compiled. However with a native schema type tree, the encoding is set dynamically.

This can lead to problems if the encoding is set to 2 different values in 2 different places in WTX. For example, using the same native schema type tree on input where the data is UTF-8, then setting the encoding to UTF-16 on output. This is not supported and will not work. The data will not be converted properly.

Answer

The work around is to copy the topmost schema to a new name and use it on output. For example, use the new name on output, the original name on input.

[{"Product":{"code":"SSVSD8","label":"IBM Transformation Extender"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Design Studio","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF025","label":"Platform Independent"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"8.4;8.3","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Ascential DataStage TX Mercator

Document Information

More support for:
IBM Transformation Extender

Software version:
8.4, 8.3

Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows, z/OS

Document number:
214339

Modified date:
09 April 2019

UID

swg21609446