Tagged Value Substitution Macros

Tagged Value macros are a special form of field substitution macros, which provide access to element tags and the corresponding Tagged Values.

Use 1: Direct Substitution

This form of the macro directly substitutes the value of the named tag into the output.

Structure: %<macroName>:"<tagName>"%

<macroName> can be one of:

  • attTag
  • classTag
  • connectorDestElemTag
  • connectorDestTag
  • connectorSourceElemTag
  • connectorSourceTag
  • connectorTag
  • linkAttTag
  • linkTag
  • opTag
  • packageTag
  • paramTag

This corresponds to the tags for attributes, Classes, operations, packages, parameters, connectors with both ends, elements at both ends of connectors and connectors including the attribute end.

<tagName> is a string representing the specific tag name.



Use 2: Conditional Substitution

This form of the macro mimics the conditional substitution defined for field substitution macros.

Structure: %<macroName>:"<tagName>" [ == "<test>"] ? <subTrue> [ : <subFalse> ]%


  • <macroName> and <tagName> are as defined above
  • [ <text> ] denotes that <text> is optional
  • <test> is a string representing a possible value for the macro
  • <subTrue> and <subFalse> can be a combination of quoted strings and the keyword value. Where the value is used, it gets replaced with the macro's value in the output.


%opTag:"opInline" ? "inline" : ""%

%opTag:"opInline" ? "inline"%

%classTag:"unsafe" == "true" ? "unsafe" : ""%

%classTag:"unsafe" == "true" ? "unsafe"%

Tagged Value macros use the same naming convention as field substitution macros.