Mapping Elements and Attributes

Using the Map Editor, you can map a number of combinations between elements and attributes:

When mapping between elements and attributes, if you want the data in the target to be different from the data in the source, you must use an XSLT extension function to define the data transformation.

Controlling vs. Argument Map Links

When linking multiple elements or attributes to a single element or attribute, the first link that you establish is a Controlling link (solid line). The transformation rule associated with the target element is executed when the source element or attribute associated with the Controlling link is encountered during a transformation. Any subsequent links that are established become Argument links (dotted line), which are available for use in the same transformation rule.

To map an element or attribute:

  1. Open the map activity icon in your project.

  2. Expand the schema icons in your map and align and size your schemas into a workable order. Guidelines

  1. To map a connection, drag the source element or attribute you want to map and drop it on the target element or attribute.
    If the connection is valid, a map link graphically connects the two.

Note:  If you want to modify the source or target element of the link, you must delete it and then re-establish the link. You cannot re-attach the link to another element.

  1. In the Properties View, select one of the following Mapping Modes from the drop-down list:

for-each

value-of

copy-of

for-each-value-of

  1. To output a value inside a CDATA Section, set the Output as CDATA property to Yes. If your map requires that a source element value be output in an embedded XML CDATA Section, then you can must set the Output as CDATA property to Yes.

  2. To save your changes, select File>Save mapName.map from the menu bar.
    When you save your map, the XSLT required to transform the source to target document is automatically generated.

  3. View the generated XSLT.

  4. Test your map.