Sorting elements

When you map repeatable nodes, you can specify sort options for that mapping.

The following instructions were written for the Resource perspective, but they will also work in many other perspectives.

Follow these steps to specify the sort keys for a mapping:

  1. Open your XML to XML mapping in the XML to XML mapping editor.

  2. Create the mapping by selecting source element and a target element, then right-click and select Create Mapping. The source and target elements must be repeatable.

  3. Right-click the target node, and click Sort. The Select Mapping Sort Keys wizard opens.

  4. Select the desired sort keys in the Available sort keys list, then click > to add them to the Added sort keys list. Use< to remove keys from the Added sort keys list. The mapping will be sorted in the order of the keys in the Added sort keys list.

  5. Select a key in the Added sort keys list and specify the sort options:

    1. Select either the Ascending or Descending radio button to specify the sort order. Ascending is the default value.

    2. Select either the Upper case or Lower case radio button to specify the case sort order. The case selected will take precedence over the other case. Upper case is the default value.

    3. Select either the Lexical or Numerical radio button to specify the data sort order. The option selected will take precedence over the other data type. Lexical is the default value.

  6. Repeat step 5 for each key as necessary.

  7. Click Finish.

The mapping will be sorted according to the keys and the options that you selected.

To remove the sort function from a mapping, right-click the target element and select Undo Sort.

 

Parent topic

Editing an XML to XML mapping

Related tasks
Mapping nodes