Wenn Sie ein Eingabenachrichtenelement in ein Ausgabeelement kopieren, werden der Wert und der Typ des Ausgabeelements auf die jeweilige Einstellung des Eingabeelements gesetzt. Wenn Sie also beispielsweise über ein XML-Eingabedokument mit einem Attribut verfügen und in Ihrer Ausgabenachricht ein Field-Element (anstelle eines Attributs) auf den Wert des Eingabeattributs setzen möchten, müssen Sie eine TYPE-Klauselumsetzung einschließen, damit der Elementtyp (element-type) vom Attribut in 'Field' geändert wird.
<Field01 Attrib01='Attrib01_Value'>Field01_Value</Field01>
Und Sie möchten die folgende Ausgabe erhalten:<MyField_A MyAttrib_A='Attrib01_Value' MyAttrib_B='Field01_Value' >
<MyField_B>Field01_Value</MyField_BC>
<MyField_C>Attrib01_Value</MyField_C>
</MyField_A'>
In diesem Fall wird folgender ESQL-Code verwendet:-- Create output attribute from input attribute
SET OutputRoot.XMLNSC.MyField_A.MyAttrib_A = InputRoot.XMLNSC.Field01.Attrib01;
-- Create output field from input field
SET OutputRoot.XMLNSC.MyField_A.MyField_B = InputRoot.XMLNSC.Field01;
-- Create output attribute from input field value, noting we have to
-- "cast" back to an attribute element
SET OutputRoot.XMLNSC.MyField_A.(XMLNSC.Attribute)MyAttrib_B =
InputRoot.XMLNSC.Field01;
-- Create output field from input attribute value, noting we have to
-- "cast" back to a field element
SET OutputRoot.XMLNSC.MyField_A.(XMLNSC.Field)MyField_C =
InputRoot.XMLNSC.Field01.Attrib01;