language-lawyerumlstereotype

Notation for multiple stereotypes


Does anyone have a ref to the UML 2.5.1 where the notation for multiple stereotypes is defined?

In EA they render «s1»,«s2» while in the spec in the only example I found it's «s1,s2»

p.267 of UML 2.5.1:enter image description here


Solution

  • On page 641

    Where multiple keywords and/or stereotype names apply, the notational options defined by 9.2.4 shall apply.

    §9.2.4 states

    If multiple keywords and/or stereotype names apply to the same model element, each may be enclosed in a separate pair of guillemets and listed one after the other. Alternatively they may all appear between the same pair of guillemets, separated by commas.

    So it appears that both «stereo1» «stereo2» as «stereo1,stereo2» are allowed.

    «stereo1»,«stereo2» does not appear to be allowed by the UML specs as it only mentions the comma's in case all stereotypes are enclosed in a single set of guillemets.

    Sparx Enterprise Architect (v 15.2) seems to render it correctly:

    enter image description here