Hi Santanu!
It may be a simply a question of existence. If I'm understanding what you are trying to do - you have an EDI file and you are transforming items in EDI to XML. You have trailing spaces in your EDI file and they have gone missing once you have them in your XML. If I've got that right so far, continue reading.
So the question is... are the spaces that you are seeing in the EDI file really there as data or has the component in the tree been defined in such a way that they are non-data such as pad characters? This distinction is a very important part of data transformation logic and in ITX the behaviours can be fine tuned in the item properties settings. We run into this often in X12-based data as the standard has wording to the effect that excess trailing spaces not needed to fulfill minimum size requirement of a data item SHOULD be suppressed - and the HIPAA TR3's all state that in that situation the excess trailing spaces MUST be suppressed.
There is much debate in the supply chain and healthcare industries as to how strongly those rules should be enforced. It's even more contested in some circles than the use of the Oxford comma in standards publications these days. Just walk into any standards working group and start muttering SHOULD verses MUST and you will see what I mean!
So - to make EVERYONE happy there is a whole series of parameters in the ITX type designer to allow you to fine tune how to interpret those pesky extra spaces in space padded data. I suspect that your tree is tolerating them for validation by classifying them as pad chars. This is fine, but then they are not data and won't be transformed. If this is your situation you will want to adjust your EDI tree to suit your needs.
Hope this helps!
------------------------------
Stephanie Fetzer
------------------------------
Original Message:
Sent: Thu June 16, 2022 11:35 AM
From: Santanu Baral
Subject: Trailing spaces ignored in XML
Hi,
Good morning
I have a EDI to XML map where one input field has data with leading and trailing spaces. One to one mapping from input to output
However the output xml preserve leading spaces but ignored trailing spaces.
Any suggestion how to preserve trailing spaces?
Thanks
Santanu
------------------------------
Santanu Baral
------------------------------
#DataExchange
#IBMSterlingTransformationExtender