Mapping by same name

Learn about the rules that apply when you select the Create transforms when the names of inputs and outputs are the same option in Auto map (automap).

About this task

When you select Create transforms when the names of inputs and outputs are the same, the following rules apply:

  1. Any output field that has a fixed value is excluded in name matching. Any output that is already mapped, or under a container that is already mapped, is excluded from name matching.
  2. If an input and an output have the same name, it is a match, regardless of the kind of, and XSD type of, the input and output. An element, a database column, or an attribute can all form a match if their names are the same.
  3. XML namespaces are excluded from name matching. Therefore, abc:something and xyz:something are considered the same, as are {http://www.abc.com}:something and {http://www.xyz.com}:something.
  4. When multiple inputs have the same name as one output, one mapping is created.

    However, if you have multiple inputs with the same name as one output and you choose to map by the same name (or similar name) and to match descendants, an attempt is made first to match by path and name. If a match is found, one transform is made, and no further matches are considered.

  5. When a single input has the same name as multiple outputs, multiple mappings are created, each for one input and one output.

    However, if you have a single input with the same name as multiple outputs and you choose to map by the same name (or similar name) and to match descendants, an attempt is made first to match by path and name. If a match is found, one transform is made, and no further matches are considered.

  6. When you select the Map all simple descendants of the selected elements option, the following steps are taken to match names:
    1. Compare the relative path and item name of the selected input and output
    2. Compare the item name without relative path
    For example, assume you have the following input and output items:
    • Input:
      OldPurchaseOrder
      		items
      			item
      				partNum
      		partNum 
    • Output:
      NewPurchaseOrder
      		items
      			item
      				partNum
      		resource
      			partNum	
    If you select Create transforms when the names of inputs and outputs are the same when you have the inputs and outputs shown above, the relative paths of all the items are:
    • Relative paths of the input items:
      items/item/partNum
      partNum
    • Relative paths of the output items:
      items/item/partNum
      resources/partNum

    During step a) items/item/partNum and items/item/partNum are matched.

    During step b) partNum and resources/partNum are matched.

    Inputs and outputs matched in a previous step are ignored in later steps.

    When you select the Map the immediate children of the selected elements option, the only step taken to match names is to compare the item name without the relative path.