NamingRule is a mandatory Property of a ModellingRule. It specifies the purpose of an InstanceDeclaration. Each InstanceDeclaration references a ModellingRule and thus the NamingRule is defined per InstanceDeclaration.
Three values are allowed for the NamingRule of a ModellingRule: Optional, Mandatory, and Constraint.
The following semantic is valid for the entire life-time of an instance that is based on a TypeDefinitionNode having an InstanceDeclaration.
For an instance A1 of a TypeDefinitionNode AlphaType with an InstanceDeclaration B1 having a ModellingRule using the NamingRule Optional the following rule applies: For each BrowsePath from AlphaType to B1 the instance A1 may or may not have a similar Node (see 6.2.4) for B1 with the same BrowsePath. If such a Node exists then the TranslateBrowsePathsToNodeIds Service (see OPC 10000-4) returns this Node as the first entry in the list.
For an instance A1 of a TypeDefinitionNode AlphaType with an InstanceDeclaration B1 having a ModellingRule using the NamingRule Mandatory the following rule applies: For each BrowsePath from AlphaType to B1 the instance A1 shall have a similar Node (see 6.2.4) for B1 using the same BrowsePath if all Nodes of the BrowsePath exist. For example, if a Node in the BrowsePath has a NamingRule Optional and is omitted in the instance, then all children of this Node would also be omitted, independent of their ModellingRules.
If an InstanceDeclaration has a ModellingRule using the NamingRule Constraint it identifies that the BrowseName of the InstanceDeclaration is of no significance but other semantic is defined with the ModellingRule. The TranslateBrowsePathsToNodeIds Service (see OPC 10000-4) can typically not be used to access instances based on those InstanceDeclarations.