How to Perform Multiple Value Mappings with One Drag and Drop Action

To create multiple value mapping with one drag and drop action

  1. Make sure that Value Mapping mode is selected in the XQuery toolbar.
  2. Select the non-leaf source element.
  3. Hold down the left mouse button, and drag the mouse pointer to the target element. Release the left mouse button.

    If the source and target elements have the same schema types, individual mappings are created for all the child elements of the source element and target element. A mapping is also created between the source and target element.

    If an element has multiple occurrences, then a FLOWR cycle is automatically created for the element. For example, the code segment below copies each Item iteratively:

    for $Item in $pParam1/Items/Item
                return <Item PartNum="{fn:data($Item/@PartNum)}">
                    <ProductName>{fn:data($Item/ProductName)}</ProductName>
                    <Quantity>{fn:data($Item/Quantity)}</Quantity>
                    <Price>{fn:data($Item/Price)}</Price>
                    <Currency>{fn:data($Item/Currency)}</Currency>
                       </Item>