When you move a connection to a different component, MapForce automatically matches identical child connections and will prompt you whether it should move them to the new location as well. A common use of this feature is if you have an existing mapping and then change the root element of the target schema. Normally, when this happens, you would need to remap all descending connections manually. This feature helps you prevent such situations.
This example uses the Tut-ExpReport.mfd file available in the <Documents>\Altova\MapForce2020\MapForceExamples\Tutorial\ folder.
Tut-ExpReport.mfd (MapForce Basic Edition)
To understand how it works, do the following:
1.Open the Tut-ExpReport.mfd sample mapping.
2.Edit the ExpReport-Target.xsd schema outside MapForce so as to change the Company root element of the target schema to Company-EU. You do not need to close MapForce.
3.After you have changed the Company root element of the target schema to Company-EU, a "Changed files" prompt appears in MapForce.
4.Click the Reload button to reload the updated Schema. Since the root element was deleted, the component displays multiple missing nodes.
5.Click Select new root element at the top of the component. (You can also change the root element by right clicking the component header and selecting Change Root Element from the context menu.)
6.Select Company-EU as new root element and click OK to confirm. The Company-EU root element is now visible at the top of the component.
7.Click the target stub of the connection that exists between the expense-report item of the source component and the Company item of the target component, and then drag-and-drop it on the Company-EU root element of the target component.
A notification dialog box appears.
8.Click Include descendent connections. This instructs MapForce to re-map the correct child items under the new root element, and the mapping becomes valid again.
|Note:||If the node to which you are mapping has the same name as the source node but is in a different namespace, then the notification dialog box will contain an additional button: "Include descendants and map namespace". Clicking this button moves the child connections of the same namespace as the source parent node to the same child nodes under the different namespace node.|