Tagged Values in Profiles

Return to Introduction  Previous page  Next page

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:

<TaggedValues>

<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"/>

</TaggedValues>

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

DefaultTaggedValues

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 (eg. values="element | attribute | both" default="both") display in the Properties window with a drop list of enableable values when selected (as in the example below). Where no Value list exists, the tag accepts free text.

TaggedValuesInProfiles