Contents > 7 SDMetrics Metamodel and XMI Transformation Files > 7.2 XMI Transformation Files > 7.2.3 Tips on Writing XMI Transformations > Inherited Attributes and Triggers Inherited Attributes and Triggers

A metamodel element can inherit attributes from a parent metamodel element. When defining XMI transformations, the child metamodel element automatically inherits the triggers that are defined for the parent's attributes. Therefore, you do not need to define triggers for inherited attributes, but only for the additional attributes of a metamodel element.

If you define a trigger for an inherited attribute, all inherited triggers for that attribute are overridden, and only the newly defined trigger(s) for that attribute are used for the child element.

Special care needs to be taken if there are multiple xmitransformations defined for the parent metamodel element. In that case, one xmitransformation is chosen arbitrarily to determine the inherited triggers for the child metamodel element. Therefore, you have to make sure that any of the possible xmitransformations is suitable to provide the inherited triggers for the child. Otherwise, explicitly provide the proper definitions of all triggers for the child metamodel element.