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:
- 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.
- 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.
- XML namespaces are excluded from name matching.
Therefore,
abc:something
andxyz:something
are considered the same, as are{http://www.abc.com}:something
and{http://www.xyz.com}:something
. - 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.
- 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.
- When you select the Map all simple descendants
of the selected elements option, the following steps are
taken to match names:
- Compare the relative path and item name of the selected input and output
- 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
anditems/item/partNum
are matched.During step b)
partNum
andresources/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.