IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
Expand all | Collapse all

Help needed: mapping problems with groups that occur 0:s -times

  • 1.  Help needed: mapping problems with groups that occur 0:s -times

    Posted 02/16/11 04:04 AM

    Originally posted by: dougal


    Hi gurus,
    I have banging my head to the wall the whole day. I have WTX 8.3.0.3 and have the following mapping problem.

    In the type tree the groups (GROUP1, GROUP2 ja GROUP3 and the message itself) are defined as implicit and with correct occurring range. I'm using functional maps for those groups.

    The source data is text message (non-xml anyway). Some of the sections in the message may occur 0-s -times. I would like to map the message into xml -message. Right now mapping works incorrectly. I think the main problem is writing this post so could someone give me some suggetions what I should do.

    In the source msg GROUP1 can occur 0-3 times, GROUP2 0-2 times and GROUP3 0-7 times.

    Example source msg:
    
    xxxxxxxxxxxGROUP1hhjjhhjjhhjjGROUP1kkllkkllkkllGROUP3bbnnggGROUP3mmjjggGROUP3ddffgg
    


    And this is what I would like to see after mapping:
    
    <root> <Data1>xxxxxxxxxxx</Data1> <G1> <D1>hh</D1> <D1>jj</D1> <D1>hh</D1> <D1>jj</D1> <D1>hh</D1> <D1>jj</D1> </G1> <G1> <D1>kk</D1> <D1>ll</D1> <D1>kk</D1> <D1>ll</D1> <D1>kk</D1> <D1>ll</D1> </G1> <G3> <D1>bb</D1> <D1>nn</D1> <D1>gg</D1> </G3> <G3> <D1>mm</D1> <D1>jj</D1> <D1>gg</D1> </G3> <G3> <D1>dd</D1> <D1>ff</D1> <D1>gg</D1> </G3> </root>
    

    But right now I'm getting:
    
    <root> <Data1>xxxxxxxxxxx</Data1> <G1> <D1>hh</D1> <D1>jj</D1> <D1>hh</D1> <D1>jj</D1> <D1>hh</D1> <D1>jj</D1> </G1> <G1> <D1>kk</D1> <D1>ll</D1> <D1>kk</D1> <D1>ll</D1> <D1>kk</D1> <D1>ll</D1> </G1> <G1> <D1>bb</D1> <D1>nn</D1> <D1>gg</D1> <D1>mm</D1> <D1>jj</D1> <D1>gg</D1> </G1> <G2> <D1>dd</D1> <D1>ff</D1> </G2> <G2> <D1>gg</D1> </G2> </root>
    

    So the mapping takes takes the message in and fills all GROUP1 occurrences and then GROUP2.

    Any ideas?

    Thanks!

    BR,
    --
    Doug
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Help needed: mapping problems with groups that occur 0:s -times

    Posted 02/16/11 04:06 AM

    Originally posted by: dougal


    Forget the xml element naming:-). In the real world the element names are unique.

    BR,
    --
    same
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender