Mapping with dynamic records

Home Page Forums BizTalk 2004 – BizTalk 2010 Mapping with dynamic records

Viewing 1 reply thread
  • Author
    Posts
    • #25750

      Hi Sir,

      Hi have a source data schema: 

      <Child>
           <Name>A<Name>
                  <Item>
                         <Detail>AB</Detail>
                         <Detail>AC</Detail>
                          ………………
                  </Item>
      <Child>

      <Detail> element is flexible, it means <Detail> can be 1 lines or 3 lines. But the maximun is 3 lines of <Detail>.

      Because the maximun of <Detail> is 3 lines, so I create a new data structure contains 3 <child> looks like:

      Destination schema:

      <Data>
          <Child_1>
                   <Name><Name>
                   <Item>
                            <Detail></Detail>
                    </Item>
          </Child_1>
          <Child_2>
                    <Name><Name>
                    <Item>
                              <Detail></Detail>
                     </Item>
          </Child_2>
          <Child_3>
                    <Name><Name>
                    <Item>
                             <Detail></Detail>
                    </Item>
          <Child_3>
      </Data>
       

      How can I map source structure to destination structure? or do you have any suggestion to map with dynamic lines?

      Thank you

       

    • #25758

      Do you need to have explicitly the number of the child in the destination schema?

      if you have in source :

      <Child>
      <Name>AA</Name>
      <Item>
      <Detail>AB</Detail>
      <Detail>AC</Detail>
      </Item>
      </Child>

      Do you need in Destination

      <Data>
      <Child>
      <Name>AA</Name>
      <Item>
      <Detail>AB</Detail>
      </Item>
      </Child>
      <Child>
      <Name>AA</Name>
      <Item>
      <Detail>AC</Detail>
      </Item>
      </Child>
      </Data>

      or

      <Data>
      <Child_1>
      <Name>AA</Name>
      <Item>
      <Detail>AB</Detail>
      </Item>
      </Child_1>
      <Child_2>
      <Name>AA</Name>
      <Item>
      <Detail>AC</Detail>
      </Item>
      </Child_2>
      </Data>

      And is <Child_3> is necessary (because there is only 2 details)

      If this is first destination, you could use the mapper and use the looping functoid linked between the Item in source and the Child in Destination and link Name and Detail from source to dest.

       

      If this is the second destination, you need to define completely the destination xsd and you can use the count functoid and index functoid to fill the correct destination node.

       

       

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.