1 Reply Latest reply on Mar 10, 2004 10:02 AM by 416346

    Advanced Array Mapping

    416346
      Hello!

      I'm trying to make a mapping in iStudio that copies an
      item on a "higher level" to all array elements. Example:
      The below xml structure is input to the mapping: (dots
      are for making this readable)

      <test_order_in_av>
      ...<ORDERNO>1</ORDERNO>
      ...<CUSTID>10</CUSTID>
      ...<ORDERDATE>100</ORDERDATE>
      ...<orderitems>
      ......<ITEMNO>1001</ITEMNO>
      ......<NOOFITEMS>2001</NOOFITEMS>
      ...</orderitems>
      ...<orderitems>
      ......<ITEMNO>1002</ITEMNO>
      ......<NOOFITEMS>2002</NOOFITEMS>
      ...</orderitems>
      ...<orderitems>
      ......<ITEMNO>1003</ITEMNO>
      ......<NOOFITEMS>2003</NOOFITEMS>
      ...</orderitems>
      </test_order_in_av>


      I want the output to be something like this (i.e. the ORDERNO item to be copied to all array elements):

      <test_order_out_av>
      ...<ORDERNO>1</ORDERNO>
      ...<CUSTID>10</CUSTID>
      ...<ORDERDATE>100</ORDERDATE>
      ...<orderitems>
      ......<ORDERNO>1</ORDERNO>
      ......<ITEMNO>1001</ITEMNO>
      ......<NOOFITEMS>2001</NOOFITEMS>
      ...</orderitems>
      ...<orderitems>
      ......<ORDERNO>1</ORDERNO>
      ......<ITEMNO>1002</ITEMNO>
      ......<NOOFITEMS>2002</NOOFITEMS>
      ...</orderitems>
      ...<orderitems>
      ......<ORDERNO>1</ORDERNO>
      ......<ITEMNO>1003</ITEMNO>
      ......<NOOFITEMS>2003</NOOFITEMS>
      ...</orderitems>
      </test_order_out_av>


      I can't get the mappings right. Is this mapping possible
      to do in iStudio?? Is there any documentation describing
      the syntax? It seems that mappings between same "levels"
      in array mappings works fine.
      I'm using OAI/iStudio 9.0.2 with the latest patches.

      Thanks
      Staale