XMI 1.2 NO IDEA Avatar
  1. OMG Issue

XMI12 — Inconsistencies for classifier-level Attributes

  • Key: XMI12-47
  • Legacy Issue Number: 4086
  • Status: open  
  • Source: DSTC ( Stephen Crawley)
  • Summary:

    There are significant inconsistencies in the handling of "classifier-level"
    Attributes by the XMI 1.1 spec.

    According to the DTD EBNF & pseudo-code, the <content> element should
    contain a <pkg-name> element for the outermost package that contains
    (some of) the classifier-level Attributes as XMI elements and/or XMI
    attributes. Nested Packages and their classifier-level Attributes
    are represented as nested XML elements withing the outer <pkg-name>
    element.

    By contrast, the document EBNF etcetera do not output a <pkg-name>
    element at all. Instead, all classifier-level Attribute values are
    output as content elements of the <xmi.content> node. In fact, the
    package nesting structure seems to disappear.

    In practice, the document production rules give a more convenient
    XML notation. It is convenient to have all of the classifier elements
    at the beginning of the contents, because they can be easily retrieved
    to create the "package instance" that holds the elements described
    by the rest of the document. By contrast, the DTD rules result in
    a document in which you have to process the entire document before
    you have the classifier-level Attribute values needed to create the
    "package instance" object.

    It should also be noted that the DTD rules and the document rules are
    variously unclear (or say nothing) about the handling of classifier-level
    Attributes that belong to super-type Packages and clustered Packages.

    My recommended fix would be to standardise on the document rules with
    the following change. The <xmi.content> element should contain a
    <pkgname> element for the top-level Package. This should have xml
    elements and attributes for all classifier-level Attributes in Classes
    it directly contains or that it inherits. It should also contain
    (recursively) elements for any clustered or nested Packages.

    This does four things:

    • It allows the consumer to tell what kind of Package to generate
      in all situations.
    • It puts values for all classifier-level Attributes at the front
      of the document.
    • It means that encoding of classifier-level and instance-level
      Attribute values is uniform.
    • It avoids the trap of having two or more MOF Attributes in
      a composed Package map to the same unqualified XML attribute
      name of the top <pkgname> element. [If it wasn't for this,
      we could collapse all classifier-level Attributes into the
      top level <pkgname> element.]
  • Reported: XMI 1.1 — Thu, 30 Nov 2000 05:00 GMT
  • Updated: Wed, 11 Mar 2015 11:12 GMT