Tagged Values in Profiles

Stereotypes within a UML Profile can have one or more associated Tagged Values. When you create an element based on a UML Profile Stereotype by dragging from the Resources window to a diagram, any associated Tagged Values are added to the element as well. Tagged Values and Profiles are an excellent way to extend the use of Enterprise Architect and the power of UML modeling.

For example, in the UML Profile for XSD, there is an XSDComplexType stereotype, which has the following Tagged Value declaration:


<Tag name="mixed" description="Determines whether this element can contain mixed element and character content. See the W3C XML Schema recommendation"/>

<Tag name="modelGroup" description="Overrides the package-level default model group" values="all | sequence | choice" default="choice"/>

<Tag name="memberNames" description="Overrides the package-level default for naming complexType definitions"/>


When you create an element from the XSDComplexType stereotype (by dragging from the Profile Elements page of the Toolbox onto a diagram), the Tagged Values are added automatically.


Tagged Values that have default values are automatically set and displayed in the element tags section, if applicable. When you select the element, the Tagged Values window displays all the associated tags, including ones that have no value set. Also note that Tagged Values in the Profile that have a Values section (for example, values="element | attribute | both" default="both") enable you to select the non-default values from a drop-down list. (See the enum Tagged Value Type in the Predefined Structured Types topic.) Where no Value list exists, the tag accepts free text.