Generating XTM Topic Maps from UML Models via XMI


You want to use your favorite XMI-enabled UML modeling tool to author XTM Topic Maps.


Readers not already familiar with Topic Maps might want to read the “Discussion” section before reviewing this solution.

Since UML was not explicitly designed to represent topic maps, this example works only if certain conventions are adopted. Most conventions revolve around the use of specific UML stereotypes. A stereotype is a UML extension mechanism that lets you associate a symbol with any UML classifier that designates that classifier as having user-defined semantics. To implement Topic Maps in UML, refer to the stereotypes listed in Table 11-2.

Table 11-2. Conventions for topic mapping in UML


UML context




Represents a topic. It is the default role of a class in our conventions, so this stereotype is optional.



Designates that the class models a subject indicator. Designate the class as a subject when it is the target of a subjectIndentityRef. Specifically, this stereotype disambiguates the subjectIndicator that references a published subject indicator rather than a topic or a resource. See



Designates that the class represents a resource used as the target of a topic-occurrence association.

Base Name


Designates that the class models an alternate topic base name and therefore implies ...

Get XSLT Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.