Originally posted by: Budman
Good Day.
I am encountering an issue when mapping name components from the EDIFACT NAD segment to XML elements. The sourcing data is the NAD Composite C080. I am attempting to map the first three appearances of sub-elements 3036 to, in order, LastName, FirstName, OtherName.
The target XML elements are defined as:
<xs:complexType name="NameType">
<xs:sequence>
<xs:element name="LastName" type="xs:string"> </xs:element>
<xs:element name="FirstName" type="xs:string"> </xs:element>
<xs:element name="OtherName" type="xs:string"> </xs:element>
</xs:sequence>
</xs:complexType>
Map rules :
LastName
=PartyName Element[1]:PartyName Composite:NAD Segment:In1
FirstName
=PartyName Element[2]:PartyName Composite:NAD Segment:In1
OtherName
=PartyName Element[3]:PartyName Composite:NAD Segment:In1
Mapping results:
This example:
NAD+FL+++DOE:JOHN:A+20 MAIN STREET:2ND ADDR LINE+ANYCITY+VA+12345+USA'
Properly maps:
<Name>
<LastName>DOE</LastName>
<FirstName>JOHN</FirstName>
<OtherName>A</OtherName>
</Name>
Missing First Name yields:
NAD+FL+++DOE::A+20 MAIN STREET:2ND ADDR LINE+ANYCITY+VA+12345+USA'
Missing First Name yields:
<Name>
<LastName>DOE</LastName>
<FirstName>A</FirstName> ß would have expected Middle Name to be mapped
</Name>
OtherName only:
NAD+FL+++:JOHN:+20 MAIN STREET:2ND ADDR LINE+ANYCITY+VA+12345+USA' Mapping discontinues/fails altogether.
I need to determine a means to simply map these components accurately when they are present or otherwise and have the map continue and NOT stop altogether.
Any thoughts on this would be MOST HELPFUL.
Thank you for any assistance you may provide.
Bud
#DataExchange#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender