Map the source business object fullname to the target business object title_firstname_lastname. When you save the map, an XSL file is generated.
- In the Business Integration view, select HelloWorldDataPowerLibrary. Right-click and select New > Data Map. The
New Data Map wizard opens showing the Create an XML Map page.
- In the Name field, enter fullname_map and click Next. The
Select Input and Output Business Objects window opens.
- Add the input business object by clicking the Add button. The Data Type Selection window opens.
- Type fullname in the entry field.
- Similarly add the output business object title_firstname_lastname. Click Finish.
The XML Map
editor opens, showing the input business object on the left side of
the editor, and the output business object on the right:
You can also add input and output objects by using
the icons at the top of the XML Map editor, as shown below:
- Wire the title element from fullname to the name element of title_firstname_lastname by dragging the cursor from title to name. This action creates a mapping with the default transform Move between the two elements:
- Wire firstName to the Move transform in the middle.
- In the Connection Selection Helper dialog, choose to create
a primary transform. This changes the Move transform
to a Concat transform.
- Create another primary connection between lastName and Concat. The map is complete.
The values of the elements title, firstName, and lastName will be
input to the Concat transform, where the strings
will be concatenated into a single result. The result will then be
put into the output element name.
- Optional: You can set properties to change the order
in which the strings are concatenated, or to add delimiters. Right-click
on Concat and select Show In > Properties View. For example, if you want commas between the input strings you can
set the delimiter property as shown below:
- Optional: The XML map editor provides a number
of transforms and functions, including XPath, EXSLT and DataPower
functions. To view the transforms and functions that are available,
click the downward arrow in the transform box.
- Optional: By default, the DataPower function set
is enabled when you create a map in a DataPower library. You can choose
to filter the function sets that you want to work with. To enable
or disable function sets:
- Click the arrow in the transform box.
- In the list of available transforms, click the arrow
on the upper right corner to view the available function sets.
- Click the function set you want to show or hide.