Stylus Studio XML Editor

Table of contents

Appendices

2.16 Equivalence of Components

Equivalence of Components

Two component instances of the same type are considered equivalent if, for each property of the first component, there is a corresponding property with an equivalent value on the second component, and the second component has no additional properties.

Instances of properties of the same type are considered equivalent if their values are equivalent.

  • For values of a simple type (see [Definition of the Simple Types Used in the Component Model]) this means that they contain the same values. For instance, two string values are equivalent if they contain the same sequence of Unicode characters, as described in [CHARMOD]

  • Values which are references to other components are considered equivalent when they refer to equivalent components (as determined above).

  • List-based values are considered equivalent if they have the same length and their elements at corresponding positions are equivalent.

  • Finally, set-based values are considered equivalent if they contain corresponding equivalent values, without regard to order.

Extension properties which are not string values, sets of strings or references MUST describe their values' equivalence rules.

Because different top-level components (e.g., Interface, Binding and Service) are required to have different names, it is possible to determine whether two top-level components of a given type are equivalent by examining their {name} and {target namespace} properties.