Introducing XML Topic Maps - XTM

XML Topic Maps (XTM) is an XML grammar for interchanging internet based topic maps. The primary aim of XTM is to improve the search of information over the web. XTM describes the interconnected resources in the web. They make the searching of documents on a particular subject much easier since the related materials can be retrieved easily using XTM. The analysis and instructions for XTM are available at

It is easy to create and process XTM document and is compatible with XML. XTM documents are readable. The main purpose of XML Topic Maps (XTM) is to give you the knowledge about resources, and where they can be found.

XML Topic Maps (XTM) represents the structure of information resources and this structure is used to define topics and their association between different topics. The characteristics of topics are its names, resources and the relationships. Topics have their characteristics within their scope. Scope of a topic defines the limited context within which the characteristics of topics are found. The documents which use the XML Topic Maps (XTM) grammar to relate them is called the “topic map”

The syntax for the XTM document is defined in the XML Topic Maps (XTM) specification. The structure of an XTM document will look as given below:

<!----Child elements of topic comes here --->
<!----Child elements of association comes here --->
<!----Child elements of mergemap comes here --->

In the above code the topic element is used to define the topic of the subject and its occurrence. A topic element can have optional child elements like <instanceOf>, <subjectIdentity>, <baseName> and <occurrence>. The topic tag can have an ‘id’ attribute to identify the topic. The <baseName> tag gives a name to the topic specified. There is a possibility for the same topic id to have different base names. For example if the topic ‘id’ is vegetables, it can have names like Carrot, Beans etc. The <occurrence> element of the topic gives the different resources available for a particular topic. The different resources that the occurrence element refers to is given by the <resourceData> or <resourceRef> tags within the <occurrence> element.

The <association> element in the topic maps is used to relate or associate different topics. The association element can have child elements like <instanceof> and <member>. The members of association are those topics which need to be realated to one another in some form or another.

The <mergeMap> tag is used to merge different topic maps to the current topic map. For this purpose the xlink:href attribute is used in the topicRef tag. An example of code for mergeMap is given below:

<mergeMap xlink:href="">
<topicRef xlink:href="#Carrot"/>
<topicRef xlink:href="#Beans"/>

<topic id="Carrot">

<topic id="Beans">

In the above code the mergeMap tag is used to merge the topic map “vegetables.xtm” with the current topic maps by adding the topics “Carrot” and “Beans” to the scope of all characteristics in the “vegetables.xtm” topic map.

Some of the commonly used elements in topic maps are given below:

<topicRef> : Reference to a Topic element
<subjectIndicatorRef> : Reference to a Subject Indicator
<scope> : Reference to Topic(s) that comprise the Scope
<instanceOf> : Points to a Topic representing a class
<topicMap> : Topic Map document element
<topic> : Topic element
<association> : Topic Association
<member> : Member in Topic Association
<occurrence> : Resources regarded as an Occurrence
<resourceRef> : Reference to a Resource
<resourceData> : Container for Resource data
<mergeMap> : Merge with another Topic Map

The XML Topic Maps (XTM) specifications can be referred for more detailed information and samples on each of these elements.The concept of XTM is used to improve the searching of documents of the web since the related document can be retrieved quickly and easily with the help of XML Topic Maps.

Role of an Element in the DOM | Creating Your Own XML Document Type Definitions / DTD | Role of Java in XML Application Architecture | Parsing with SAX and DOM | Processing XML using DOM | How to Access a Database Using XML |How to Build a Simple XML Parser | Creating Channels in XML |HTML Tidy Tool | Importing Document Trees using XSL | Namespace in XML | Using XSLT Variables | Web Assistant Wizard | Basic Structure of an XML DOM |

SetApp - 100 Apps for everything you ever wanted to do on Mac

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.


Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.


FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.



Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.



Add to My Yahoo!

Visit XML Training Material Guide Homepage



“Amazon and the Amazon logo are trademarks of, Inc. or its affiliates.”

Copyright - © 2004 - 2019 - All Rights Reserved.