none
BizTalk Mapper - repeat node RRS feed

  • Question

  • I have to get the output node repeated twice with almost same data. Im trying to use the functoid and tried looping functoid, but that would help.

         

    Example of Output schema I have is as: 

    <Root>
    ..
    ..
    ..
    <ParentNode>
        <ChildNode_Type>
         <ChildNode1>
          <ChildNode2>
    ..
    ..
    .. 

     Needs to repeat the same data with different 'ChildNode_Type' values in the output. The values in ChildNode_Type is coming from 2 different concactnate functoid. One functoid has TypeA and other functoid has TypeB. ChildNode1 and ChildNode2 comes from the same 2 nodes in source schema.

     I'm using the BizTalk mapper as most of the other mapping are straight forward, didnt look at the xslt option.


     <ParentNode>
     <ChildNode_Type>TypeA</ChildNode_Type>
     <ChildNode1>ABC</ChildNode_Type>
     <ChildNode2>XYZ</ChildNode_Type>
     </ParentNode>
     <ParentNode>
     <ChildNode_Type>TypeB</ChildNode_Type>
     <ChildNode1>ABC</ChildNode_Type>
     <ChildNode2>XYZ</ChildNode_Type>
     </ParentNode>

    Any thoughts or recommendations. Please share. Thanks.


    Raja

    Tuesday, October 16, 2018 1:45 PM

Answers

  • You can do that easily in XSLT.

    You can do one thing Connect all your Mappings and even for ChildNode_Type give "TypeA" for string Concatenate functoid. 

    now, when you do the Test Map you will get the following output.

     <ParentNode>
     <ChildNode_Type>TypeA</ChildNode_Type>
     <ChildNode1>ABC</ChildNode_Type>
     <ChildNode2>XYZ</ChildNode_Type>
     </ParentNode>

    If you Click on Validate Map you will get the XSLT for the above. Now Take that XSLT  and copy the Logic of Parent Node and Paste it below that. Then you can just change the ChildNode_Type to Type B in it.

    in the Map you can refer the Custom XSLT.


    Sujith

    • Marked as answer by Sax001 Tuesday, October 16, 2018 3:56 PM
    Tuesday, October 16, 2018 2:21 PM
  • Use XSLT as suggested or the table functiod

    /Peter


    When asking a question please be as thoroughly as possible this will make it easier to assist you http://www.catb.org/esr/faqs/smart-questions.html

    • Marked as answer by Sax001 Tuesday, October 16, 2018 3:56 PM
    Tuesday, October 16, 2018 2:27 PM

All replies

  • You can do that easily in XSLT.

    You can do one thing Connect all your Mappings and even for ChildNode_Type give "TypeA" for string Concatenate functoid. 

    now, when you do the Test Map you will get the following output.

     <ParentNode>
     <ChildNode_Type>TypeA</ChildNode_Type>
     <ChildNode1>ABC</ChildNode_Type>
     <ChildNode2>XYZ</ChildNode_Type>
     </ParentNode>

    If you Click on Validate Map you will get the XSLT for the above. Now Take that XSLT  and copy the Logic of Parent Node and Paste it below that. Then you can just change the ChildNode_Type to Type B in it.

    in the Map you can refer the Custom XSLT.


    Sujith

    • Marked as answer by Sax001 Tuesday, October 16, 2018 3:56 PM
    Tuesday, October 16, 2018 2:21 PM
  • Use XSLT as suggested or the table functiod

    /Peter


    When asking a question please be as thoroughly as possible this will make it easier to assist you http://www.catb.org/esr/faqs/smart-questions.html

    • Marked as answer by Sax001 Tuesday, October 16, 2018 3:56 PM
    Tuesday, October 16, 2018 2:27 PM
  • Were you referring to using the ParentNode Logic in a Inline XSLT or just have a Custom XSLT only for this ParentNode for it to repeat.

    Raja

    Tuesday, October 16, 2018 3:27 PM
  • I was suggesting a custom xslt for parent node to repeat

    Sujith

    Tuesday, October 16, 2018 3:40 PM