XML mapping tips

This topic provides tips on creating xml to xml mappings for an XSL Transformation primitive.

When the root is /, /header or /context

When you select /, /headers or /context as the root, you need to explicitly map all the message sections in the XML Mapping editor using the Match Mapping menu option. Otherwise, you may get errors at runtime. For information on how to match mapping, see the example in "Creating a new XML map" in the related tasks below.

Mapping elements in a choice list

To map elements in a choice list in the XML mapping editor, follow these steps:
  1. Open the XML map in the XML mapping editor.
  2. Expand the elements in the source and target views. By default, the first choice in the list will appear in the each view:
    First choice element in the source view
  3. Click the source choice element. An arrow appears beside the element:
    Choice element drop down arrow
  4. Click the arrow to view all the choice elements in the source.
  5. To select the choice element that you want to map, click the element:
    Choice element selection
  6. Double click the element that is selected. Notice that the selected choice element now appears in the source view:
    Selected choice element appears in the source view
  7. Similarly, select a choice element in the target view:
    Choice element in target view
  8. Select the elements to map by clicking on the source element, and then clicking on the target element. Right click, and Create Mapping.
    Create Mapping
  9. The mapped elements appear in the Overview section of the XML mapping editor:
    Mapped elements in Overview section
Note: Only the most recently mapped choice elements will appear in the Overview section of the XML mapping editor. You can view all the mapped choice elements in the Outline view, as shown below:
Mapped choice elements in the outline view
Related tasks
Using an existing XSL style sheet
Creating a new XML map
Using an existing XML map
Migrating an XSL Transformation primitive

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.