Topic Map Query Language (TMQL)

This page is about TMQL, a query language for Topic Maps (TM). It documents our efforts to create the ISO 18048 standard as part of the Topic Map standards family.


TMs are currently stored in a variety of backend technologies: text documents, XML files, XML databases, relational databases and—of course—in native Topic Map databases. While all these base technologies offer languages such as XPath or SQL to access parts of the TM content, the need for a dedicated retrieval and query language was acknowledged.

Applications may use a TMQL processor to pass in query statements which will be evaluated in the context of one (or more) topic maps [ SVG ]:

How the topic maps themselves are stored - whether using a native topic map backend or any of the more conventional data stores, is not defined by the language.

TMQL (Topic Map Query Language) is a standardization effort by ISO/IEC JTC1 SC34 WG3 [ TM ] with the objective to create a standard for such a language (ISO 18048). In a sense our charter can be compared to the RDF pendant DAWG.

At this stage it is agreed that part 1 of TMQL will cover retrieval scenarios only; updating is left for part 2, which will be handled separately.

Current Status and Timeline

TMQL has now stabilized, and is currently out for an FCD ballot finishing 2008-11-17.

Relevant documents:

TMQL Working Draft
This is the latest TMQL draft. Feedback much wanted.
TMQL Tutorial
A tutorial explaining the latest TMQL draft in a more accessible fashion than the specification does.
TMQL Language Features
A document providing an overview of TMQL's features with some design rationale and background..
TMQL Requirements
This document outlines syntactic and semantic requirements of a future TMQL. It also contains meta requirements to be applicable to the standard document or the standardization process itself.
TMQL Use Cases
This document motivates the use of TMQL in applications using several rather high-level scenarios. The core part singles out one such application and defines a set of sample queries. TMQL proposals are encouraged to cover these use cases.
Language Proposals: Use Case Solutions
This document collates the solutions as suggested by various language proposals for the problems defined in section 5 of the use case document. This is for comparison mainly, not all queries are actually operational in their respective implementations.

What are the current proposals for TMQL?

The ones we are aware of are (if we have left something out, please email the editors):

Language (homepage) Vendor/Author Resources Comments
TMRQL NetworkedPlanet Specification In production use
tolog Ontopia Tutorial
In production use
Empolis TMQL Empolis ? In production use?
AsTMa? Robert Barta Tutorial
Mostly implemented, online demo
TMPath Dmitry Bogachev Introduction Prototyped
Toma Rani Pinchuk Tutorial/Specification Prototyped
TMQL strawman Ann Wrightson Rationale Rationale only
XTMPath Robert Barta Tutorial Specification Implemented, not really a fully-fledged query language, more a means to drill down topic maps
tmfun Lars Marius Garshol Presentation PowerPoint only

What happened at the Meetings?

Traditionally, the WG3 meetings coincide with one of the XML conferences. Following documents are related to TMQL:

London April 2003

Amsterdam April 2004

Two full days of productive discussions have been spent. The following presentations were given:

They resulted in a road map which has a starting point the clay man version.

How to get involved?

We are getting closer to finalizing the language, but are still open to new suggestions. You can therefore:


Download the resources in TM form (yes, we eat our own dogfood :-)

The editors, 2008-07-17.