UML 2.5 FTF Avatar
  1. OMG Issue

UML25 — PrimitiveTypes::UnlimitedNatural lacks an XML-compatible serialization for the 'unbounded' value

  • Key: UML25-547
  • Legacy Issue Number: 18831
  • Status: closed  
  • Source: NASA ( Dr. Nicolas F. Rouquette)
  • Summary:

    Some tools serialize 'unbounded' as '*' as shown in the UML spec, other tools serialize 'unbounded' as '-1'.
    The UML spec needs a clear specification for the serialization of 'unbounded' to ensure interchange across tools.

  • Reported: UML 2.5b1 — Thu, 25 Jul 2013 04:00 GMT
  • Disposition: Resolved — UML 2.5
  • Disposition Summary:

    The W3 XML Schema 1.1 DataTypes specification includes an example of a definition of a datatype that is
    conceptually equivalent to that of PrimitiveTypes::UnlimitedLiteral in clause 2.4.1.3 of the XML Schema
    1.1 DataTypes specification: http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#atomic-vs-list
    2.4.1.3 Union datatypes
    Union types may be defined in either of two ways. When a union type is ’constructed’ by ’union’, its
    ’value space’, ’lexical space’, and ’lexical mapping’ are the “ordered unions” of the ’value spaces’, ’lexical
    spaces’, and ’lexical mappings’ of its ’member types’. It will be observed that the ’lexical mapping’ of a
    union, so defined, is not necessarily a function: a given ’literal’ may map to one value or to several values
    of different ’primitive’ datatypes, and it may be indeterminate which value is to be preferred in a particular
    context. When the datatypes defined here are used in the context of [XSD 1.1 Part 1: Structures], the xsi:type
    attribute defined by that specification in section xsi:type can be used to indicate which value a ’literal’ which
    is the content of an element should map to. In other contexts, other rules (such as type coercion rules) may
    be employed to determine which value is to be used. When a union type is defined by ’restricting’ another
    ’union’, its ’value space’, ’lexical space’, and ’lexical mapping’ are subsets of the ’value spaces’, ’lexical
    spaces’, and ’lexical mappings’ of its ’base type’. ’Union’ datatypes are always ’constructed’ from other
    datatypes; they are never ’primitive’. Currently, there are no ’built-in’ ’union’ datatypes.
    Example
    A prototypical example of a ’union’ type is the maxOccurs attribute on the element element in XML Schema
    itself: it is a union of nonNegativeInteger and an enumeration with the single member, the string “unbounded”,
    as shown below.
    <attributeGroup name="occurs">
    <attribute name="minOccurs" type="nonNegativeInteger"
    use="optional" default="1"/>
    <attribute name="maxOccurs"use="optional" default="1">
    <simpleType>
    <union>
    <simpleType>
    <restriction base=’nonNegativeInteger’/>
    </simpleType>
    <simpleType>
    <restriction base=’string’>
    <enumeration value=’unbounded’/>
    </restriction>
    </simpleType>
    </union>
    </simpleType>
    </attribute>
    </attributeGroup>
    It is not possible to follow the above example because theMOF/XMI restricts a schemaType to be a datatype
    defined in the XML Schema DataType specification

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