As an alternative to the key function: http://support.adeptia.com/entries/21281176-use-key-function-to-group-source-header-details
For this we have one key element in both the source schemas.
E.g. if there are two source schemas having “name” as key . Here we will fetch age from the second schema on the basis of matching name field.
1) Apply for-each at the target record with the xPath of the first schema.
2) Create a local variable say “varName” at the record level, to select first schema “name” field value.
3) Now apply the below rule at the element “AgeOfPerson” (element where common data from second source needs to be mapped)
$Input_employeeData2_XMLSchema/Root/Records[name = $varName]/age.