A subtype overrides an InstanceDeclaration by specifying an InstanceDeclaration with the same BrowsePath. An overridden InstanceDeclaration shall have the same NodeClass and BrowseName. The TypeDefinitionNode of the overridden InstanceDeclaration shall be the same or a subtype of the TypeDefinitionNode specified in the supertype.
It is only possible to override InstanceDeclarations that are directly referenced from the TypeDefinitionNode. If an indirect referenced InstanceDeclaration, such as “J” in Figure 14, has to be overridden, then the directly referenced InstanceDeclarations that includes “J”, in that case “B”, have to be overridden first and then “J” can be overridden in a second step.
A Reference is replaced if it goes between two overridden Nodes and has the same ReferenceType as a Reference defined in the supertype. The Reference specified in the subtype may be a subtype of the ReferenceType used in the parent type.
Any non-hierarchical References specified for the overridden InstanceDeclaration are treated as new References unless the ReferenceType only allows a single Reference per SourceNode. If this situation exists the subtype can change the target of the Reference but the new target shall have the same NodeClass and for Objects and Variables also the same type or a subtype of the type specified in the parent.
The overriding Node may specify new values for the Node Attributes other than the NodeClass or BrowseName, however, the restrictions on Attributes specified in 6.2.6 apply. Any Attribute provided by the overridden InstanceDeclaration has to be provided by the overriding InstanceDeclaration, additional optional Attributes may be added.
A subtype should not override a Node unless it needs to change it.