Topics

A topic map consists of a collection of topics. A topic is a proxy for anything that the topic map author wishes to document in his or her topic map. As already indicated, the thing that a topic represents can be:

Figure 2, below, shows the distinction between a topic and the object or concept that the topic represents in the real world. An author has in his or her mind the subject to be documented and creates a topic. The topic is a machine representation of the subject which can now be stored, queried and manipulated by the computer.

An author has in mind a subject to be documented and creates a topic which is stored in the computer as a machine representation of that concept.

Figure 2 - Representing the real world with topic maps

Topic Characteristics

Characteristics is a collective term used to describe the three properties which a topic may have which together form the collection of assertions that the topic map author has made about the subject that the topic represents.

Basic Topic Syntax

The following example shows the representation of a simple topic map consisting of a single topic. Note that the <topicMap> element defines the default namespace as the namespace defined for XTM 1.0 and the namespace for XLink. In later examples I will omit the XML declaration and the namespace declaration to save space. To save space, I have not included the full text of the XTM DTD in this article, but it is available to online on the TopicMaps.Org site at http://www.topicmaps.org/xtm/1.0/

<?xml version="1.0"?>
<topicMap xmlns="http://www.topicmaps.org/xtm/1.0/"
	xmlns="http://www.w3.org/1999/xlink">

  <topic id="xzyyz">
    <baseName>
      <baseNameString>Redmond Computers Inc.</baseNameString>
    </baseName>
    <occurrence>
      <resourceRef xlink:href="http://www.redmondcomputers.com/"/>
    </occurrence>
    <occurrence>
      <resourceData>1977</resourceData>
    </occurrence>
  </topic>

</topicMap>
          

Sample 1 - A simple topic map

Some points to note about the XTM syntax introduced in this example:

Up: Topic Map Basics
Next: Types