Generate Sibling Nodes in Pairs


For some specific scenarios, the sibling nodes should appear after each other at the target in Data mapping.


For example, at the Source side of Data Mapping client has two nodes namely EN_TRN_CMP_EVW and PSCAMA. Requirement is that the PSCAMA should always be after EN_TRN_CMP_EVW at target end. 

To achieve this, apply the Custom ForEach in the CustomXSL on EN_TRN_CMP_EVW and PSCAMA nodes inside Data mapping. Follow the steps shown below to have sibling nodes after each other at the target.

1. At  EN_TRN_CMP_EVW node use "Custom XSL Before" and apply Custom ForEach on it. Also define a local variable in "Custom XSL Before"(say varcount) that will work as a counter.

2. At PSCAMA node apply "Custom XSL After"and increase the count (+1) of the variable defined in Step 1.

3. Apply the mapping on EN_TRN_CMP_EVW.

4. Apply the mapping on PSCAMA and use the "Position() function" in the  textual rule under XSL Predicate to fetch the desired output.


Have more questions? Submit a request


Article is closed for comments.