Mapping Repeating Elements

Using the Map Editor, you can map repeating and non-repeating elements including:

The target in the map repeats with the source by mapping the node on the source with ‘minOccurs=0, maxOccurs<>0’ to the same type of node on the target.

You can readily identify repeating elements in your schemas as having defined cardinality. {minOccurs} or {maxOccurs} properties appear in the schema nodes.

To map a repeating element:

  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 you want to map and drop it on the target element.
    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 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 maps.