XMI 2.4 RTF Avatar
  1. OMG Issue

XMI24 — Use of xmi:type

  • Key: XMI24-114
  • Legacy Issue Number: 12859
  • Status: closed  
  • Source: Adaptive ( Mr. Pete Rivett)
  • Summary:

    Section 4.6.4. states:

    “The type attribute is used to specify the type of object being serialized, when the type is not known from the model. This can occur if the type of a reference has subclasses, for instance.”

    And Rule 2g in section 6.4.2 states:

    “If the class of the object cannot be determined unambiguously from the model, you must specify the class name using the “type” attribute.”

    In general it is never possible to determine a class unambiguously from the model – since any class may be extended with subclasses in model extensions – and many other aspects of XMI are designed to allow for this. The document itself is inconsistent as to whether the xmi:type property is optional: in 4.5.3 it is declared as optional, in 4.6.4 it is not.

    Furthermore, the fact that xmi:type is optional makes it impossible in many cases to determine the type of elements, especially if using an XML-based tool without access to the metamodel.

    Proposed resolution:

    -----------------------

    Replace the above quoted sentences with the following:

    4.6.4

    “The type attribute is used to specify the type of object being serialized.”

    6.4.2 2g

    “You must specify the class name using the “type” attribute.”

    In the example below Figure 6.6 replace:

    <Department id=“13”>

    <member name=“Glozic”/>

    <member name=“Andrews”/>

    </Department>

    With:

    <Department id=“13”>

    <member name=“Glozic” xmi:type=”Employee”/>

    <member name=“Andrews” xmi:type=”Employee”/>

    </Department>

  • Reported: XMI 2.1.1 — Wed, 24 Sep 2008 04:00 GMT
  • Disposition: Resolved — XMI 2.4
  • Disposition Summary:

    Replace text as described below

  • Updated: Fri, 6 Mar 2015 20:59 GMT