Legacy Issue Number: 5233
Source: International Business Machines ( Tim Grose)
Currently, the XML schema generation rules for references and compositions
indicate that the elements corresponding to these MOF constructs can have
any content and any attributes, unless the useSchemaExtensions tag is true,
or the contentType tag is complex.
The default value of the contentType tag is complex. This means that
elements corresponding to references and compositions are set to the schema
type corresponding to the MOF class that is their type in default XMI 2.0
For example, if there is a MOF model with a class Container that is related
via a composition relationship to a class called Part, and the Container
class has a reference called part, the relevant part of the Container type
is the following by default:
<element name="part" type="Part"/>
If the class Part has subclasses, Part1 and Part2, each of which has local
attributes and references, the default declaration of Container is as
above. Also, the types in a schema corresponding to Part1 and Part2 are not
related by schema extension, since the default value of useSchemaExtensions
However, documents in which Part1 or Part2 are serialized in the "part"
element (and values of the local attributes and references are serialized
for them), do not validate with the default schema, because they are not of
type "Part". I believe that default XMI 2.0 schemas should validate
documents with either Part, Part1, or Part2 serialized in the "part"
To avoid this problem, I propose that the default value of the contentType
tag be no value (nil), rather than complex.
I believe we intended that the type of elements such as "part" would allow
any content in default XMI 2.0 schemas, and if someone knows about XML
schemas, that person can use the XMI tags to create schemas that are more
restrictive than the default schemas.
Reported: XMI 1.2 — Fri, 26 Apr 2002 04:00 GMT
Disposition: Resolved — XMI 1.3
Updated: Sat, 7 Mar 2015 04:37 GMT
XMI13 — Default Value of contentType Tag Should Be Nil
- Key: XMI13-20
- OMG Task Force: XMI 1.3 RTF